Public Class Form1

    Dim WithEvents RC As New iRobots.RoCar01

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        Dim time As Integer
        time = TextBox1.Text
        RC.MoveC("F")
        RC.WaitN(time)
        RC.MoveC("X")
    End Sub

    Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
        Dim time As Integer
        time = TextBox1.Text
        RC.MoveC("B")
        RC.WaitN(time)
        RC.MoveC("X")
    End Sub

    Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
        Dim time As Integer
        time = TextBox1.Text
        RC.MoveC("L")
        RC.WaitN(time)
        RC.MoveC("X")
    End Sub

    Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click
        Dim time As Integer
        time = TextBox1.Text
        RC.MoveC("R")
        RC.WaitN(time)
        RC.MoveC("X")
    End Sub
End Class
