Launch an Exe from a C# WinForm 
Author Message
 Launch an Exe from a C# WinForm

Hi all,

I have a C# WinForm (oops, I guess that's
officially "Windows Form" now), and I have a button which
on_click should launch a Windows application.  For
simplicity, say I wish to launch "C:\winnt\system32
\notepad.exe" and have it come up on the screen.

Any ideas on how to make this happen in C# (I tried a few
MFC/COM tricks and did not have any luck)?  Now I'm stuck.

Thanks in advance for any help or info you can provide.

Kevin



Sun, 21 Mar 2004 12:13:34 GMT  
 Launch an Exe from a C# WinForm
That will teach me to look around a bit first before
posting! I found this on www.csharp-corner.com in the "How
Do I" section:

System.Diagnostics.Process.Start "http://www.c-
sharpcorner.com" );

I modified it to:
System.Diagnostics.Process.Start("c:\\winnt\\system32
\\notepad.exe" );

and put it into my Button click method and it worked
perfectly.

Kevin

Quote:
>-----Original Message-----
>Hi all,

>I have a C# WinForm (oops, I guess that's
>officially "Windows Form" now), and I have a button which
>on_click should launch a Windows application.  For
>simplicity, say I wish to launch "C:\winnt\system32
>\notepad.exe" and have it come up on the screen.

>Any ideas on how to make this happen in C# (I tried a few
>MFC/COM tricks and did not have any luck)?  Now I'm stuck.

>Thanks in advance for any help or info you can provide.

>Kevin
>.



Sun, 21 Mar 2004 12:47:12 GMT  
 Launch an Exe from a C# WinForm
mhh..
do you have try System.Diagnostics.Process class ?
no, you don't, i believe.... but you should !


Mon, 22 Mar 2004 01:45:03 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Error in C# Winform exe

2. launching an .exe from a C# program

3. Debug a exe launched by another exe

4. Debug VC6 exe launched from VB6 exe

5. Winform.exe execution from HTTP

6. Theoretical Question C++ vs C# WinForms

7. Problem with test C# WinForm

8. Convert VB 6 forms to C# WinForms?

9. Theoretical Question C++ vs C# WinForms

10. C# WinForm closure generates Win32 Thread Error ?

11. Memory size of C# WinForm app

12. Winforms in C#

 

 
Powered by phpBB® Forum Software