- Linux MultiMedia Studio Computer Accessories User Manual

Mint v4 PC Programming Guide
44
MN1278 05.2001
installErrorEventHandler
installFastInEventHandler
installInputEventHandler
installMoveBufferLowEventHandler
installSerialReceiveEventHandler
installStopSwitchEventHandler
installResetEventHandler
installTimerEventHandler
installUnknownEventHandler
The passed parameter is a BOOLEAN parameter.
TRUE indicates that a handler exists on the host PC
FALSE indicates that a handler does not exist on the host PC.
VisualBasic Example:
Create a MintController object called ‘nmPCI’.
in the Form_Load function add:
nmPCI.setNextMovePCI1Link 0, 0
nmPCI.installTimerEventHandler TRUE
nmPCI.setTimerEvent 1000
Double click on the MintController object and select the TimerEventHandler function, add the code:
Dim b As Boolean
nmPCI.getRelay 0, b
IfbThen
nmPCI.setRelay 0, 0
Else
nmPCI.setRelay 0, 1
End If
When the timer event is generated on the controller, this will interrupt the host PC and create a timer event. This
is trapped by the ActiveX control and executes the code in the timer event.
In this example the timer event is set to trigger every second, the code within the timer event handler will toggle
the state of the relay.