现在的位置: 首页 > 综合 > 正文

c# 启动本机程序

2013年02月16日 ⁄ 综合 ⁄ 共 699字 ⁄ 字号 评论关闭
using System;

using System.Collections.Generic;

using System.ComponentModel;

using System.Data;

using System.Drawing;

using System.Text;

using System.Windows.Forms;



using System.IO;

using System.Runtime.InteropServices;

using System.Security;



using System.Diagnostics; //命名空间提供特定的类,使您能够与系统进程、事件日志和性能计数器进行交互。

namespace WindowsApplication1

{

    /// <summary>

    /// 启动本机系统程序

    /// 只需要把程序的exe文件写入Process.Start("")中就行

    /// </summary>

    public partial class Form1 : Form

    {

        public Form1()

        {

            InitializeComponent();

        }



        private void button1_Click(object sender, EventArgs e)

        {

            Process.Start("calc.exe");//计算器

        }



        private void button2_Click(object sender, EventArgs e) 

        {

            Process.Start("TTPlayer.exe");

        }



        private void button3_Click(object sender, EventArgs e)

        {

            Process.Start("IEXPLORE.EXE");

        }

    }

}

抱歉!评论已关闭.