2012-03-05 73 views
1

我是一名新的C#程序員。 我想在我的C#程序中託管eclipse程序,所以用戶將打開我的程序,並在裏面將eclipse程序全部放在一個窗口中。我嘗試下面的代碼,它是nodepad工作方案,但不偏食在C#程序中託管Eclipse程序

 Process proc; 

     // Start the process 
     proc = Process.Start("C:\\eclipse/eclipse.exe"); 
     proc.WaitForInputIdle(); 

     // Set the panel control as the application's parent 
     SetParent(proc.MainWindowHandle, this.panel1.Handle); 

     // Maximize application 
     SendMessage(proc.MainWindowHandle, 274, 61488, 0); 

任何幫助,將不勝感激

+0

System.Diagnostics.Process.Start(」CMD.exe「,」/ C「+ fileZillaPath +」\\\「FileZilla Server.exe \」/ reload-config「);這個代碼在我以前工作過,注意有兩個參數,第一個是CMD.exe,第二個是路徑。我認爲/ C也很重要 – Joel 2012-03-05 19:52:37

+0

我想補充一點問題。該代碼打開eclipse程序,但不像在記事本中一樣在相同的窗口中。它在其他窗口中打開日食。對不起,不要這樣說。 – 2012-03-06 06:57:24

回答

0

試試這個的Process.Start(@「eclipsePath /的eclipse.exe」,@」您的文件路徑「)

相關問題