override function Key F4

  • Thread starter Thread starter win
  • Start date Start date
W

win

My form has a dropdown combox and function key "F4" is used for save
information.
When I press "F4", the combox display the options and then exec. save
coding.
Can I skip the display options of the combox?

Thanks a lot
 
Suppress the keystroke in the ComboBox's KeyDown event:

Private Sub ComboBox1_KeyDown(ByVal sender As Object, ByVal e As
System.Windows.Forms.KeyEventArgs) Handles ComboBox1.KeyDown
If e.KeyCode = Keys.F4 Then
e.SuppressKeyPress = True
Exit Sub
End If
End Sub
 
nice info,

i have a similar problem,

the function Key F4 is assigned as Shortcut to a Child Form from MDI Parent Form,

While pressing F4 in ComboBox in a DataGridView instead of showing the Combo box drop down list, the Child Form was Activated.

waiting for some ideas

regards
Annamalai



surtur wrote:

RE: override function Key F4
08-Jan-08

Suppress the keystroke in the ComboBox's KeyDown event:

Private Sub ComboBox1_KeyDown(ByVal sender As Object, ByVal e As
System.Windows.Forms.KeyEventArgs) Handles ComboBox1.KeyDown
If e.KeyCode = Keys.F4 Then
e.SuppressKeyPress = True
Exit Sub
End If
End Sub

Previous Posts In This Thread:

override function Key F4
My form has a dropdown combox and function key "F4" is used for save
information.
When I press "F4", the combox display the options and then exec. save
coding.
Can I skip the display options of the combox?

Thanks a lot

RE: override function Key F4
Suppress the keystroke in the ComboBox's KeyDown event:

Private Sub ComboBox1_KeyDown(ByVal sender As Object, ByVal e As
System.Windows.Forms.KeyEventArgs) Handles ComboBox1.KeyDown
If e.KeyCode = Keys.F4 Then
e.SuppressKeyPress = True
Exit Sub
End If
End Sub

Re: override function Key F4
Thanks a lot


Submitted via EggHeadCafe - Software Developer Portal of Choice
C# Threading Http Requests
http://www.eggheadcafe.com/tutorial...69-7010659bd748/c-threading-http-request.aspx
 
Back
Top