469,643 Members | 1,257 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,643 developers. It's quick & easy.

disable f4 key for combo box

When your selected on a combo box, and hit F4, it shows
the drop down list.

So how do i stop the F4 key from bringing up the drop down
list on a combo box?
Nov 20 '05 #1
1 2975
Hello,

"Dante" <da******@hotmail.com> schrieb:
When your selected on a combo box, and hit F4, it shows
the drop down list.

So how do i stop the F4 key from bringing up the drop down
list on a combo box?


\\\
Private Declare Auto Function SendMessage Lib "user32.dll" ( _
ByVal hwnd As IntPtr, _
ByVal wMsg As Int32, _
ByVal wParam As Boolean, _
Optional ByVal lParam As Int32 = 0 _
) As Int32

Private Const CB_SETEXTENDEDUI As Int32 = &H155
..
..
..

' Disable F4.
SendMessage(Me.ComboBox1.Handle, CB_SETEXTENDEDUI, True)
///

For enabling F4, pass 'False' in the last parameter.

--
Herfried K. Wagner
MVP · VB Classic, VB.NET
http://www.mvps.org/dotnet
Nov 20 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by MervinJadhav | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.