iX - Script example, detect connected VNC clients
The following example has been tested on iX-Developer 1.30.445
The enclosed zip-file contains an example showing how to detect if a VNC-client has connected to the VNC server.
The background script code continually monitors the status of the TCP ports on the system, and sets a global tag VncActive accordingly.
When using the example a couple of prerequisites need to be met:
First, you need to add a file to the Referenced Assemblies list, the file you need to add is the OpenNETCF.Net.dll file, found in the Temp/Output directory of any iX-Developer 1.30 project. The enlosed example already has this done.
Second, you need to make sure that the Globals.VNCDetection.StartCheck(); function is executed in the Opened event on the first screen in order to create the timer object that is then used to do the periodical check with.
After that, you simply use the VncActive tag to indicate if a remote VNC-client has connected to the panel or not.
_________________ Best Regards,
Beijer Electronics, Inc. Ron Lloyd | Applications Engineer
|