1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
| Public Class ComboCheckedListBox
Dim vueListBox As New CheckedListBox
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click, TextBox1.Click
If vueListBox.Visible Then
vueListBox.Hide()
Else
'MsgBox(Me.Location.X & "//" & Me.Location.Y & "//" & Me.Location.Y + 20)
'MsgBox(Me.PointToScreen(Me.Location).X & "//" & Me.PointToScreen(Me.Location).Y + 20)
Me.vueListBox.Location = New System.Drawing.Point(Me.PointToScreen(Me.Location).X - Me.Location.X, Me.PointToScreen(Me.Location).Y - Me.Location.Y + 20)
Me.vueListBox.Width = Me.Width
vueListBox.Show()
vueListBox.MonShower(Me)
End If
End Sub
End Class |
Partager