[問題] 如何用button 開啟應用程式
小弟是新手 爬了文也上網找了很久 還是得不到解答
想請問
我想設計一個button 按下去後會執行一個 .exe檔的應用程式
那該使用哪種指令呢?? 是不是用process??
我試了
private void button2_Click(object sender, EventArgs e)
{
Process BthChat = new Process();
// FileName 是要執行的檔案
BthChat.StartInfo.FileName = "BthChat.exe";
BthChat.Start();
}
這樣是正確的嗎?? 謝謝
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 163.25.118.136
→
05/15 22:59, , 1F
05/15 22:59, 1F
→
05/15 22:59, , 2F
05/15 22:59, 2F
→
05/15 23:00, , 3F
05/15 23:00, 3F