[C#] winform MessageBox Topmost로 띄우기
·
프로그래밍/C#
winform 개발 시 Topmost로 설정된 폼 위로 MessageBox를 Show해야되는 경우가 있을때 Topmost True로 Show를 안할 시 메세지 박스가 가려지기 때문에 프로그램이 멈춘 것 처럼 인식 되므로 아래의 구문처럼 메세지 박스를 호출 해야된다. MessageBox.Show(new Form() { TopMost = true }, "TopMost MessageBox", "qratedev.tistory.com"); 메서드 설명 MessageBox.Show 메서드 (System.Windows.Forms) | Microsoft Learn MessageBox.Show 메서드 (System.Windows.Forms) 메시지 상자를 표시합니다. learn.microsoft.com
[WinForm] TableLayoutPanel 행 동적으로 컨트롤 하기
·
프로그래밍/C#
C# Winform에서 TableLayoutPanel로 Runtime시 동적으로 행을 숨기고 보이게 하는 방법 - 숨김 처리될 행의 SizeType을 Absolute으로 설정 - 숨김 처리될 행 아래에 행이 있다면 그 행을 SizeType을 Percent로 설정 - 숨김 처리될 행의 Height를 0으로 설정 - 숨김 처리될 행만큼 TableLayoutPanel의 Height 조절 [빨간박스는 숨겨질 행] Hide Button Source Code 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 private void btnHideShow_Click(object sender, EventArgs e) { int hideRow = tableLayoutPanel1.GetRow(..