private void bVNC_Click(object sender, EventArgs e) { string text = Environment.GetFolderPath(Environment.SpecialFolder.ProgramFiles) + "\\uvnc bvba\\UltraVNC\\winvnc.exe"; string str = IP_Def; IP = tIP.Text; if (!string.IsNullOrEmpty(IP)) { str = IP; } if (File.Exists(text)) { Splash splash = new Splash("Starting Remote Control ..."); splash.Show(); splash.Invalidate(); Application.DoEvents(); if (CheckCommands.VNC_Running()) { Process.Start(text, "-kill"); while (CheckCommands.VNC_Running()) { } } Process.Start(text, "-connect " + str + ":5500 -run"); splash.Hide(); splash.Dispose(); Application.DoEvents(); MessageBox.Show("Waiting connection ..."); } else { MessageBox.Show("Remote Control Software is not installed"); } }
private void bVNC_OFF_Click(object sender, EventArgs e) { string text = Environment.GetFolderPath(Environment.SpecialFolder.ProgramFiles) + "\\uvnc bvba\\UltraVNC\\winvnc.exe"; if (File.Exists(text)) { if (CheckCommands.VNC_Running()) { Splash splash = new Splash("Stop Remote Control ..."); splash.Show(); splash.Invalidate(); Application.DoEvents(); Process.Start(text, "-kill"); while (CheckCommands.VNC_Running()) { } splash.Hide(); splash.Dispose(); Application.DoEvents(); } else { MessageBox.Show("Remote Control is stoped"); } } else { MessageBox.Show("Remote Control Software is not installed"); } }