[Controls] [vb.net] 컨트롤 순서 변경(맨앞으로/맨뒤로)
하나를하더라도최선을
2020-02-24 12:46
8,225
0
본문
Public Sub SetControlZOrder(ByVal ctrl As Control, ByVal z As Integer)
ctrl.Parent.Controls.SetChildIndex(ctrl, z)
End Sub
ex:)
SetControlZOrder(Button1, 0) '// 맨앞
SetControlZOrder(Panel1, 1) '// 맨뒤
Control.BringToFront 메서드()네임스페이스: System.Windows.Forms
어셈블리: System.Windows.Forms.dll의 System.Windows.FormsPublicSubBringToFront
Sample:)
PrivateSubMakeLabelVisible()' If the panel contains label1, bring it' to the front to make sure it is visible.Ifpanel1.Contains(label1)Thenlabel1.BringToFront()EndIfEndSub
컨트롤을 Z 순서의 맨 앞으로 가져옵니다.
어셈블리: System.Windows.Forms.dll의 System.Windows.FormsPublicSubBringToFront
Sample:)
PrivateSubMakeLabelVisible()' If the panel contains label1, bring it' to the front to make sure it is visible.Ifpanel1.Contains(label1)Thenlabel1.BringToFront()EndIfEndSub
컨트롤을 Z 순서의 맨 뒤로 보냅니다.
네임스페이스: System.Windows.Forms
어셈블리: System.Windows.Forms.dll의 System.Windows.Forms
댓글목록0