일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | |||||
3 | 4 | 5 | 6 | 7 | 8 | 9 |
10 | 11 | 12 | 13 | 14 | 15 | 16 |
17 | 18 | 19 | 20 | 21 | 22 | 23 |
24 | 25 | 26 | 27 | 28 | 29 | 30 |
- Django-allauth
- numpy
- FastAPI
- Django
- array
- tkinter Radio 동적버튼
- GraphQL
- SQL
- graphene-django
- allauth
- check_password
- flask
- for loop
- python
- Today
- Total
객
[ vb 2008 ] 사용자 컨트롤 매핑 본문
SplitContainer 컨트롤 , TableLayoutPanel컨트롤 과 사용자 컨트롤과 매핑시키기
Private m_ImageDGV As UserControl1
Private m_ImageDGY2 As UserControl2
Private m_ImageDGY3 As UserControl3
Private m_ImageDGY4 As UserControl4
Private Sub UserControl(ByVal ctl As UserControl)
Static VisibleControl As UserControl
' Panel leeren
If Me.SplitContainer1.Panel2.Controls.Count > 0 Then
VisibleControl.Dispose()
End If
' UserControl in das Panel hosten
ctl.Dock = DockStyle.Fill
Me.SplitContainer1.Panel2.Controls.Add(ctl)
' Aktuelles Control merken
VisibleControl = ctl
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
m_ImageDGV = New UserControl1
Me.UserControl(m_ImageDGV)
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
m_ImageDGY2 = New UserControl2
Me.UserControl(m_ImageDGY2)
End Sub
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
m_ImageDGY3 = New UserControl3
Me.UserControl(m_ImageDGY3)
End Sub
Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click
m_ImageDGY4 = New UserControl4
Me.UserControl(m_ImageDGY4)
End Sub
'[PL] > VB & VB.NET' 카테고리의 다른 글
[ vb 2008 ] WPF 예제 (0) | 2010.01.02 |
---|---|
[ vb 2008 ] ImageList 예제 (0) | 2010.01.01 |
[ vb 2008 ] ListView 예제. (0) | 2009.12.30 |
[ VB.NET ] OpenFileDialog 예제 (0) | 2009.12.29 |
[vb 2008]Try Catch 정리 (0) | 2009.12.24 |