|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Open Combo Box and DatePicker on focus event
I am developing a package and client want to open the combo box to be opened on 'setfocus' event or when cursor is focused on combo or DatePicker.
Please help me as soon as possible Wioth regards Vikas AThavale Last edited by vikaspa : October 31st, 2002 at 06:45 AM. |
|
#2
|
||||
|
||||
|
Send the control a CB_SHOWDROPDOWN message using SendMessage and set wParam = 1 to drop the list (wParam = 0 will close the list), something like this:
Code:
Private Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hWnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As Long
Const CB_SHOWDROPDOWN = 335
Private Sub Combo1_GotFocus()
Call SendMessage(Combo1.hWnd, CB_SHOWDROPDOWN, 1, 0)
End Sub
Hope this helps! |
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > Visual Basic Programming > Open Combo Box and DatePicker on focus event |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|