I am trying to control a PTZ camera using the keyboard arrow keys this method has two problems one it is running far too fast and sending out too many serial commands, and the second problem is when I let go of the key I want to send a stop command to the camera.
To detect the keypress I am using this code:
Protected Overrides Function ProcessCmdKey(ByRef msg As Message, _
ByVal keyData As Keys) As Boolean
Select Case keyData
please remember this is a two wire link with no handshaking to the serial port at 2400 baud.
So my question again if I press for example the left arrow key I just want the program to send one pan left command and then when I release the key send one stop command.
Any help would be much appreciated. Please remember I'm a very very new user.