14-09-19, 04:04 AM
(آخر تعديل لهذه المشاركة : 14-09-19, 04:07 AM {2} بواسطة Rabeea Qbaha.)
PHP كود :
Private Sub TextBox1_KeyDown(sender As Object, e As KeyEventArgs) Handles TextBox1.KeyDown
If e.KeyCode = Keys.F11 Then
MsgBox("F11 key pressd ")
End If
End Sub
PHP كود :
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")
Case Keys.Enter
MessageBox.Show("Enter pressed")
End Select
End Sub
Private Sub TextBox1_KeyDown(sender As Object, e As KeyEventArgs) Handles TextBox1.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 Or Keys.Enter Then
FuncKeysModule(e.KeyValue)
e.Handled = True
End If
End Sub
