Trying to open a sketch from a C# Windows Form Application.

I'm trying to integrate a sketch application into a windows form application written in C#, I'm using an "ExecuteAsAdmin" function which can execute .exe files as a system administrator, but using it on my sketch.exe doesn't do anything.


public static void ExecuteAsAdmin(string fileName)
{
Process proc = new Process();
proc.StartInfo.FileName = fileName;
proc.StartInfo.UseShellExecute = true;
proc.StartInfo.Verb = "runas";
proc.Start();
}

private void button1_Click(object Sender, eventArgs e)
{
ExecuteAsAdmin("F:\CSProject\9 - Programs\perceptron\application.windows32\perceptron.exe");
}


Tagged:

Answers

  • edited October 2017

    I used a browser window in my C# app and then used P5js. This got me the display that I wanted....not sure if your need is similar.

  • Please format your code. Edit your post (gear on top right side of any of your posts), select your code and hit ctrl+o. Leave an empty line above and below your block of code.

    Can you share your Processing code?

    If you provide all the info of your C# code, I could try to put it together and run it. An example of this kind would be valuable in the forum.

    Kf

Sign In or Register to comment.