Created
October 15, 2018 06:39
-
-
Save mrgarita/d09a124a804cc8780dcf82ca4c5971f0 to your computer and use it in GitHub Desktop.
C#:外部アプリケーションを起動する
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Diagnostics; | |
using System.Windows.Forms; | |
namespace 外部アプリケーションを起動する | |
{ | |
public partial class Form1 : Form | |
{ | |
public Form1() | |
{ | |
InitializeComponent(); | |
this.Text = ProductName; | |
button1.Text = "メモ帳を起動"; | |
} | |
private void button1_Click(object sender, EventArgs e) | |
{ | |
Process myProcess = new Process(); | |
myProcess.StartInfo.FileName = "notepad.exe"; | |
myProcess.Start(); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment