private void button1_Click(object sender, System.EventArgs e)
2
{
3 string strFilePath = Application.StartupPath +@"/TextFile1.txt";
4 MessageBox.Show(strFilePath);
5 System.Diagnostics.Process.Start(strFilePath);
6 }
7
8 private void button2_Click(object sender, System.EventArgs e)
9
{
10 string strFilePath = Application.StartupPath +@"/HTMLPage1.htm";
11 MessageBox.Show(strFilePath);
12 System.Diagnostics.Process.Start(strFilePath);
13 }
1
System.Diagnostics.Process.Start(
"
shutdown
"
,
@"
/l
"
);
//
------------注销计算机
2
System.Diagnostics.Process.Start(
"
shutdown
"
,
@"
/r
"
);
//
------------重起计算机
![](https://i-blog.csdnimg.cn/blog_migrate/f0cd6c7f9e7ae96feae062cb48f670f0.gif)
2
![](https://i-blog.csdnimg.cn/blog_migrate/f0cd6c7f9e7ae96feae062cb48f670f0.gif)