How can i call a program
Pls how can i call a program from my own project. example i want to call windows media player when ever i press a button or when ever my program starts.
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Master BillaPosted Oct 21, 2009, 11:58 PM
Just simple any program you can in .net usign process class.
for example, if you need call notepad,
using System.Diagnostics;
private void button1_Click(object sender, EventArgs e)
{
Process p = new Process();
p.StartInfo.FileName = "notepad.exe";
p.Start();
}
Same way you can call the windows media palyer
using System.Diagnostics;
private void button1_Click(object sender, EventArgs e)
{
Process p = new Process();
p.StartInfo.FileName = "wmplayer.exe";
p.Start();
}
Thank you
Kirtan PatelPosted Oct 21, 2009, 3:26 PM
using System.Diagnostics;
private void button1_Click(object sender, EventArgs e)
{
Process p = new Process();
p.StartInfo.FileName = "wmplayer.exe";
p.Start();
}
check "Do you like this answer" if helps you :)