18-04-13, 06:13 PM
السلام عليكم ورحمة الله وبركاته
تفضل أخي الكريم
بالتوفيق
تفضل أخي الكريم
كود :
Public Class Form1
Private Sub Form1_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles Me.KeyDown
If e.KeyCode = Keys.F1 Then
Timer1.Enabled = True
ElseIf e.KeyCode = Keys.F2 Then
Timer1.Enabled = False
End If
End Sub
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Me.KeyPreview = True
End Sub
Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
End Sub
End Class
بالتوفيق