0

Does anyone know how to start an application from other application in C# for smart devices?

2
Contributors
3
Replies
4
Views
9 Years
Discussion Span
Last Post by Errel
0

Hi pete,

I'm not exactly sure what you mean, but if you want to start another form in your application you can do this by:

yourFormName form = new yourFormName();

form.ShowDialog(); //This will lock all your other forms until this dialog is closed
form.Show(); //This will run the form and keep your other forms unlocked aswell, if you close your main form though, this one will close aswel.

Or if you would like to run an executable file, you can just use the System.Diagnostics.Process library.

for example:
System.Diagnostics.Process.Start("C:\WINDOWS\system32\CALC.EXE");

Since this is a standard windows executable though, you could have also used Process.Start("calc.exe");

I hope this helped!

0

I want to start other application (xyz.exe)
I have tried with Process.Start, but I keep on getting error messages, presumably because of wrong path. Remember that I 'm working on smart device, so my path is something like "My Device/Program Files/..." or am I wrong...

0

Hi pete,

You might be doing the same thing wrong as i did in my last reply. Sorry about that.
Try using double slashes. Like this:

System.Diagnostics.Process.Start("C:\\WINDOWS\\system32\\CALC.EXE");

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.