Page 1 of 1

Remote VNC

Posted: Wed Jul 24, 2019 2:39 pm
by scoobler
I currently have an X2 Pro (actually 3 identical setups), running at remote locations. I have been using VNC for remote viewing - but today it has completely stopped working - the panel is blocking the connection.

I am able to FTP in to the panel, I uploaded a page to give me the vital information I needed, so I know the pane is on and working.

Is it possible to remotely reset the VNC server? Maybe even a script that is triggered by a tag, I could have the reset button linked to the tag on the web page? Obviously this won’t help me in this situation as I will need to upload the project and I don’t trust the connection enough, but on my next visit I can update so this doesn’t happen again.



Thanks for any pointers!

Re: Remote VNC

Posted: Sat Aug 24, 2019 2:26 pm
by baaron
There are scripts that reset the VNC server however they make it so that some Viewers no longer work(TightView being the only one Ive tested to know doesnt work, RealVNC VNC Viewer does continue to work however)

First off however have you checked to see if Remote Access is enabled for the project still?

Is anyone else trying to access it at the same time? (One viewer at a time limit)

Assuming you want a "Start_VNC" button and a "Stop_VNC" button on a Screen1 you could do:

Code: Select all

namespace Neo.ApplicationFramework.Generated
{
    using System.Windows.Forms;
    using System;
    using System.Drawing;
    using Neo.ApplicationFramework.Tools;
    using Neo.ApplicationFramework.Common.Graphics.Logic;
    using Neo.ApplicationFramework.Controls;
    using Neo.ApplicationFramework.Interfaces;
	using OpenNETCF;
    
    public partial class Screen1
    {
		
		void Start_VNC_Click(System.Object sender, System.EventArgs e)
		{
			System.Diagnostics.Process.Start(@"\FlashDrive\Project\VSC.exe","");
			
		}
		
		void Stop_VNC_Click(System.Object sender, System.EventArgs e)
		{	
			var processes = OpenNETCF.ToolHelp.ProcessEntry.GetProcesses();
			foreach(OpenNETCF.ToolHelp.ProcessEntry process in processes)
			{
				if (process.ToString().ToUpper() == "VSC.EXE".ToUpper())
				{
					process.Kill();
				}
			}
			
		}
		

    }
}
ensure that you have OpenNETCF.Net.dll Referenced in Project>Referenced Assemblies for this to work.