我們有時候需要在當前應用程式中,啟動另乙個程式。比方說,我們正在使用某信、某q等,需要啟動乙個檢測環境的應用程式,這時候可能就要單獨啟動另乙個程式了。
這是如何實現的呢?
system.diagnostics.process process = new system.diagnostics.process();
process.startinfo.filename= @"cmd.exe";
process.start();
使用process類,宣告它的物件,以及配置好startinfo屬性資訊,然後便可以使用start()方法進行啟動。
完整**如下:
我們可以看一下processstartinfo類的定義:
祝您用餐愉快。
Android APP開啟另乙個APP完整邏輯實現
intent intent new intent intent.action main 知道要跳轉應用的包命與目標activity componentname componentname new componentname kuyu.com.x kuyu.com.x.login.welcomeact...
如何在程式中開啟另乙個程式
shellexecute的使用方法 q 如何開啟乙個應用程式?shellexecute this m hwnd,open calc.exe sw show 或 shellexecute this m hwnd,open notepad.exe c mylog.log sw show q 如何開啟乙個...
Spring在乙個事物中開啟另乙個事物並提交
自己平時的一點筆記 在對資料庫資料進行修改操作時,當 現異常時,那麼事物就會進行回滾操作,資料庫內的資料將不會被修改 但總是會有一些需要就是即使 中途報錯了,也要將資料庫中的資料進行修改,這時,就需要重新開啟乙個事物去提交 方法一 運用註解 transactional propagation pro...