Option Strict On Public Class Form1 Private leftFlag As Boolean = False Private rightFlag As Boolean = False Private left_ichi As Integer Private Sub Form1_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles Me.KeyDown If e.KeyCode = Keys.Left Then leftFlag = True If e.KeyCode = Keys.Right Then rightFlag = True End Sub Private Sub Form1_KeyUp(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles Me.KeyUp If e.KeyCode = Keys.Left Then leftFlag = False If e.KeyCode = Keys.Right Then rightFlag = False End Sub Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick If leftFlag = True Then left_ichi -= 3 End If If rightFlag = True Then left_ichi += 3 End If If left_ichi < 3 Then left_ichi = 3 If left_ichi > 897 Then left_ichi = 897 Me.mikataA.Left = left_ichi End Sub Private Sub Form1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load left_ichi = 450 End Sub End Class