0
當使用Web瀏覽器編碼C#時,使用Gecko庫時出現問題。C#Gecko web瀏覽器顯示,然後在10秒後退出
我在這裏的代碼:
public Form1()
{
InitializeComponent();
Gecko.Xpcom.Initialize(Application.StartupPath + "\\xulrunner");
string link = "http://google.com/";
geckoWebBrowser1.Navigate(link);
System.Threading.Thread.Sleep(10000);
Environment.Exit(0);
}
我想,當我運行的應用程序,它會顯示我與谷歌的內容,然後自動退出10秒鐘後網頁瀏覽器。
謝謝。