'butona 1 adet buton ekle ve kodları yapıştır.
Private Sub Command1_KeyDown(KeyCode As Integer, Shift As Integer)
'(buradaki kodlar alt tuşu ile birlikte yön tuşlarına basarsan
' butonunu sağa sola hareket ettirir)
If KeyCode = vbKeyRight And Shift = 4 Then
Command1.Width = Command1.Width + 50 'alt tuşu ile sağ yön tuşu butonu sağa doğru büyütür
End If
If KeyCode = vbKeyLeft And Shift = 4 Then
Command1.Width = Command1.Width - 50 'alt tuşu ile sağ yön tuşu butonu sola doğru küçültür
End If
If KeyCode = vbKeyUp And Shift = 4 Then
Command1.Width = Command1.Height + 500
End If
If KeyCode = vbKeyDown And Shift = 4 Then
Command1.Width = Command1.Height - 500
End If
' şimdi ctrl tuşlarıyla butonu hareket ettirelim ctrl tuşu ile yön tuşlarına bas
If KeyCode = vbKeyRight And Shift = 2 Then
Command1.Left = Command1.Left + 500
End If
If KeyCode = vbKeyLeft And Shift = 2 Then
Command1.Left = Command1.Left - 500
End If
If KeyCode = vbKeyUp And Shift = 2 Then
Command1.Top = Command1.Top - 500
End If
If KeyCode = vbKeyDown And Shift = 2 Then
Command1.Top = Command1.Top + 500
End If
'bu kodda formun başlığını saat yapar
If KeyCode = vbKeyF2 Then
Form1.Caption = Time
End If
'bu kodda formun başlığını tarih yapar
If KeyCode = vbKeyF3 Then
Form1.Caption = Date
End If
End Sub