|
-
July 24th, 2003, 01:14 AM
#1
I want a ComboBox to expand(drop down the list) whenever it gets focus
I want a ComboBox to expand(drop down the list) whenever it gets focus.
I am thinking abiut getting a handle to mouse and firing its click or mouse down event for left button on the location where that particular ComboBox is placed. But dont know how to get the mouse handle?
Any Idea about mouse handle or direclty manipulating ComboBox as i need it?
-
July 24th, 2003, 01:44 AM
#2
Use this code
Code:
Private Declare Function PostMessage Lib "user32" Alias "PostMessageA" _
(ByVal hwnd&, ByVal wMsg&, ByVal wParam&, ByVal lParam&) As Long
Private Const CB_SHOWDROPDOWN = &H14F
Private Sub Combo1_GotFocus()
Call PostMessage(Me.Combo1.hwnd, CB_SHOWDROPDOWN, 1, 0)
End Sub
Hope it will help you
-
July 24th, 2003, 04:32 AM
#3
combobox
Hi
for this purpose u can use shredian Grid Control that has many enhanced features for developer i hope it will provide an ease for you for future developement
Bye...
Shahzeb Khan
-
July 24th, 2003, 05:30 AM
#4
For a simple solution try using Sendkeys "{F4}" in the Got_Focus event. This should drop down the list.
-
July 24th, 2003, 07:06 AM
#5
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|