Timer
 
Installation Reference
Using the control in NS Basic

|

|

Download

The S309Timer.ocx version 1.5 provides a timer ActiveX control like the one provided with Visual Basic. Timer ActiveX Control will keep the device from going into suspend mode when running a program without user input.

 

 

Installation of Timer ActiveX control on the Desktop

Transfer the desktop version of the S309Timer.ocx to the c:\Windows\system32 directory

Register the control on the desktop by doing:

Start - Run - regsvr32 c:\Windows\system32\S309Timer.ocx

You should get "DllRegisterServer in c:\Windows\system32\S309Timer.ocx Succeeded."

When the desktop control is registered properly it will automatically add the registry entries to enable it to be used with VBCE.

Using the Timer ActiveX control in NS Basic

AddObject "S309.Timer.1","Timer1",0,0
Timer1.interval = 1000 'pop every second
Timer1.enabled = True ' start the timer.

sub Timer1_Timer()
  print cstr(now)
end sub

"Timer1" can be any name
",0,0" can be anything, but must be present. I am using mfc and could not get it to work with out an x and y coord.