Private Const WM_LBUTTONDOWN As Int32 = &H201 Private Const WM_LBUTTONUP As Int32 = &H202 Private Declare Function SendMessage Lib "user32.dll" Alias "SendMessageW" (ByVal hwnd As Int32, ByVal wMsg As Int32, ByVal wParam As Int32, ByVal lParam As Int32) As Int32 Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click With KryptonDateTimePicker1 SendMessage(.Handle, WM_LBUTTONDOWN, 1, .Width - 10 + &H50000) SendMessage(.Handle, WM_LBUTTONUP, 1, .Width - 10 + &H50000) End With End Sub
Vous n’avez pas trouvé la réponse que vous recherchez ?
Posez votre questionPrivate Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hwnd As Integer, ByVal wMsg As Integer, ByVal wParam As Integer, ByVal lParam As Object) As Long Private Const CB_SHOWDROPDOWN As Integer = &H14F
SendMessage(ComboBox_Softs.Handle, CB_SHOWDROPDOWN, True, IntPtr.Zero)
rivate Const WM_LBUTTONDOWN As Int32 = &H201 Private Declare Function SendMessage Lib "user32.dll" Alias "SendMessageW" (ByVal hwnd As Int32, ByVal wMsg As Int32, ByVal wParam As Int32, ByVal lParam As Int32) As Int32 Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click With DateTimePicker1 SendMessage(.Handle, WM_LBUTTONDOWN, 1, .Width - 10 + &H8000 * .Height) End With End Sub
DateTimePicker1.Focus() ' oubien DateTimePicker1.Select() SendKeys.SendWait("%{DOWN}")
SendKeys.SendWait("%{DOWN}")a changé ?