导航下载对话框打开时的Web浏览器

时间:2017-08-18 13:38:43

标签: c#

program.cs代码

static void Main()
    {
        CheckHWID();
        Application.EnableVisualStyles();
        Application.SetCompatibleTextRenderingDefault(false);
        var lgn = new Form2();
        lgn.FormClosed += new FormClosedEventHandler(FormClosed);
        lgn.Show();
        Application.Run();
    }
    static void FormClosed(object sender, FormClosedEventArgs e)
    {
        ((Form)sender).FormClosed -= FormClosed;
        if (Application.OpenForms.Count == 0) Application.ExitThread();
        else Application.OpenForms[0].FormClosed += FormClosed;
    }

program.cs和表格2 - > form1的(web浏览器)

      Form1 fr = new Form1();
        fr.Show();
        this.Close();

form1.code

browser.Navigate("http://google.com");

导航浏览器时 打开下载websource对话框 我不知道为什么会发生这种情况

0 个答案:

没有答案