熱點推薦:
您现在的位置: 電腦知識網 >> 編程 >> .NET編程 >> 正文

c# 啟動本機程序

2013-11-13 09:48:56  來源: .NET編程 

  

  using System;
        using SystemCollectionsGeneric;
        using SystemComponentModel;
        using SystemData;
        using SystemDrawing;
        using SystemText;
        using SystemWindowsForms;
        using SystemIO;
        using SystemRuntimeInteropServices;
        using SystemSecurity;
        using SystemDiagnostics; //命名空間提供特定的類使您能夠與系統進程事件日志和性能計數器進行交互
        namespace WindowsApplication
        {
            /// <summary>
            /// 啟動本機系統程序
            /// 只需要把程序的exe文件寫入ProcessStart()中就行
            /// </summary>
            public partial class Form : Form
            {
                public Form()
                {
                    InitializeComponent();
                }
                private void button_Click(object sender EventArgs e)
                {
                    ProcessStart(calcexe);//計算器
                }
                private void button_Click(object sender EventArgs e)
                {
                    ProcessStart(TTPlayerexe);
                }
                private void button_Click(object sender EventArgs e)
                {
                    ProcessStart(IEXPLOREEXE);
                }
            }
        }


From:http://tw.wingwit.com/Article/program/net/201311/11654.html
    推薦文章
    Copyright © 2005-2013 電腦知識網 Computer Knowledge   All rights reserved.