Visual Basic is what is known as on Object Oriented Language, so you add Objects (Lines, Boxes, Shapes) to a form and then create some matching code which is executed when you Click (usually) on that object. The modified Form for the Points Program now looks like. The objects on this form are Lines 1 and 2, Shapes 6 and 7 and a couple of Command Buttons called Clockwise and Anti Clockwise. When we Click on Clockwise, then some code is executed. This lot !! Private Sub Clockwise_Click() MSComm1.Output = "C" ' Sends a "C" to the Arduino code which makes the Servo turn Clockwise.Enabled = False ' Disables the "Clockwise" button so we can't press it by mistake Line2.BorderColor = &HC0C0FF ' Changes Line 2 to a beige kind of colour Line1.BorderColor = &HC0C0FF ...
Members of the Model Electronics Railway Group