Ahojte mám problém, hledal jsem to i na internetu, ale výsledek je stejný. jde o tenhle případ
Private Sub Form1_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles Me.KeyDown
If e.KeyValue = Keys.F1 Or Keys.F2 Or Keys.F3 Or Keys.F4 Or Keys.F5 Or Keys.F6 Or Keys.F7 Or Keys.F8 Or Keys.F9 Or Keys.F10 Or Keys.F11 Or Keys.F12 Then
FuncKeysModule(e.KeyValue)
e.Handled = True
End If
End Sub
Public Sub FuncKeysModule(ByVal value As Keys)
'Check what function key is in a pressed state, and then perform the corresponding action.
Select Case value
Case Keys.F1
'Add the code for the function key F1 here.
MessageBox.Show("F1 pressed")
Case Keys.F2
'Add the code for the function key F2 here.
MessageBox.Show("F2 pressed")
Case Keys.F3
'Add the code for the function key F3 here.
MessageBox.Show("F3 pressed")
Case Keys.F4
'Add the code for the function key F4 here.
MessageBox.Show("F4 pressed")
Case Keys.F5
'Add the code for the function key F5 here.
MessageBox.Show("F5 pressed")
Case Keys.F6
'Add the code for the function key F6 here.
MessageBox.Show("F6 pressed")
Case Keys.F7
'Add the code for the function key F7 here.
MessageBox.Show("F7 pressed")
Case Keys.F8
'Add the code for the function key F8 here.
MessageBox.Show("F8 pressed")
Case Keys.F9
'Add the code for the function key F9 here.
MessageBox.Show("F9 pressed")
Case Keys.F10
'Add the code for the function key F10 here.
MessageBox.Show("F10 pressed")
Case Keys.F11
'Add the code for the function key F11 here.
MessageBox.Show("F11 pressed")
Case Keys.F12
'Add the code for the key F12 here
MessageBox.Show("F12 pressed")
End Select
End Sub
Takže když na start debugging tak se otevře ten můj program, ale když zmáčknu třeba F8 tak se mi ta zpráva nezobrazí. nevíte, čím to může být? Děkuji předem za odpovědi
|