調用外部程序netdraw啟動文件vnademo.txt,該如何寫?NetDraw路徑:@Application.StartupPath + "\\" + "tools\\netdraw.exe"vnademo.txt路徑:@Application.StartupPath + "\\" + "tools\\vnademo.txt"其中,vnademo.txt中的內容是打開netdraw時的一些參數如何才能把參數正確地傳給netdraw?大哥大姐求幫助......
1 回答

慕村9548890
TA貢獻1884條經驗 獲得超4個贊
沒有安裝你說的那個程序,但步驟也就是先讀取TXT文件,把內容讀出來作為參數打開應用程序唄,我用如下代碼調用IE打開一個網站是可以的:
StreamReader sr = new StreamReader(@"E:\Test\ConsoleTest\url.txt");
String url=sr.ReadLine();
System.Diagnostics.Process myProcess = new System.Diagnostics.Process();
myProcess.StartInfo.FileName = "iexplore.exe";
myProcess.StartInfo.Arguments = url;
myProcess.Start();
- 1 回答
- 0 關注
- 576 瀏覽
添加回答
舉報
0/150
提交
取消