Detecting VNC connection

A forum devoted to the discussion of all topics having to do with scripting and other advanced programming using iX Developer.
Post Reply
hans gerritsen
Posts: 26
Joined: Fri Jan 20, 2012 12:55 pm

Detecting VNC connection

Post by hans gerritsen »

Hi,

Is there a way to detect if a VNC connection is active on a TA-panel?

Hans

User avatar
Ron L.
Posts: 214
Joined: Fri Jul 15, 2011 3:21 pm

Re: Detecting VNC connection

Post by Ron L. »

This is possible with script. I've attached a sample project with script you can reference. This is BETA and not be fully tested.
Attachments
DetectVNC.zip
(82.49 KiB) Downloaded 968 times
Best Regards,

Beijer Electronics, Inc.
Ron Lloyd | Applications Engineer

User avatar
Ron L.
Posts: 214
Joined: Fri Jul 15, 2011 3:21 pm

Re: Detecting VNC connection

Post by Ron L. »

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

hans gerritsen
Posts: 26
Joined: Fri Jan 20, 2012 12:55 pm

Re: Detecting VNC connection

Post by hans gerritsen »

Hi Ron,

This is great! Thanks a lot for the example. I've implemented it and it works fine.
I haven't tried your recommendations on the other questions I had, but I'll try them soon.

Regards,

Hans

Nayan Dodhia
Posts: 1
Joined: Tue Oct 14, 2014 3:45 am

Re: Detecting VNC connection

Post by Nayan Dodhia »

Hi Ron,
I have tried you code it works super !!
Is it possible to disconnect an active VNC connection ?
Do you have some idea about it ?

Regards,
Nayan

Post Reply