TextBox1.BackColor = System.Drawing.SystemColors.Control
TextBox1.BorderStyle = System.Windows.Forms.BorderStyle.None
TextBox1.Cursor = System.Windows.Forms.Cursors.Arrow
TextBox1.ReadOnly = True
Private Sub TextBox1_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles TextBox1.KeyDown
If e.KeyCode = Keys.Up Then
TextBox1.Location = New System.Drawing.Point(TextBox1.Location.X, TextBox1.Location.Y - 1)
e.Handled = True
ElseIf e.KeyCode = Keys.Down Then
TextBox1.Location = New System.Drawing.Point(TextBox1.Location.X, TextBox1.Location.Y + 1)
e.Handled = True
End If
End Sub
PrivateSub TextBox1_KeyDown(ByVal sender AsObject, ByVal e As System.Windows.Forms.KeyEventArgs) Handles TextBox1.KeyDown
If e.KeyCode = Keys.Up Then
TextBox1.Location = New System.Drawing.Point(TextBox1.Location.X, TextBox1.Location.Y - 1)
e.Handled = True
ElseIf e.KeyCode = Keys.Down Then
TextBox1.Location = New System.Drawing.Point(TextBox1.Location.X, TextBox1.Location.Y + 1)
e.Handled = True
ElseIf e.KeyCode = Keys.Left Then
TextBox1.Location = New System.Drawing.Point(TextBox1.Location.X - 1, TextBox1.Location.Y)
e.Handled = True
ElseIf e.KeyCode = Keys.Right Then
TextBox1.Location = New System.Drawing.Point(TextBox1.Location.X + 1, TextBox1.Location.Y)
e.Handled = True
EndIf
EndSub
[SIZE=2][COLOR=#0000ff]
Private[/COLOR][/SIZE][SIZE=2] [/SIZE][SIZE=2][COLOR=#0000ff]Sub[/COLOR][/SIZE][SIZE=2] Timer1_Tick([/SIZE][SIZE=2][COLOR=#0000ff]ByVal[/COLOR][/SIZE][SIZE=2] sender [/SIZE][SIZE=2][COLOR=#0000ff]As[/COLOR][/SIZE][SIZE=2] System.Object, [/SIZE][SIZE=2][COLOR=#0000ff]ByVal[/COLOR][/SIZE][SIZE=2] e [/SIZE][SIZE=2][COLOR=#0000ff]As[/COLOR][/SIZE][SIZE=2] System.EventArgs) [/SIZE][SIZE=2][COLOR=#0000ff]Handles[/COLOR][/SIZE][SIZE=2] Timer1.Tick
TextBox2.Location = [/SIZE][SIZE=2][COLOR=#0000ff]New[/COLOR][/SIZE][SIZE=2] System.Drawing.Point(TextBox2.Location.X, TextBox2.Location.Y + 5)
[/SIZE][SIZE=2][COLOR=#0000ff]End[/COLOR][/SIZE][SIZE=2] [/SIZE][SIZE=2][COLOR=#0000ff]Sub
[/COLOR][/SIZE]