3

Internet Explorer 11 で非常に奇妙なシナリオを 1 つ取得しました。IE 10 まで正常に動作していた Internet Explorer 用の C# 自動化プログラムを 1 つ作成しましたが、IE 11 から突然、ドキュメントの完了が停止し、10 回中 8 回以上発生しました。

以下のコードの例を見てください。

初めてメッセージボックスが表示され、それが表示されることはありません。

using System;
using System.Windows.Forms;
using SHDocVw;

namespace IE11_POC
{
    public partial class Form1 : Form
    {
        InternetExplorer IE;

    public Form1()
    {
        InitializeComponent();
    }

    private void button1_Click(object sender, EventArgs e)
    {

        IE = new InternetExplorer();
        IE.Visible = true;

        IE.DocumentComplete += IE_DocumentComplete;
        IE.Navigate("http://stackoverflow.com/");

    }


    void IE_DocumentComplete(object pDisp, ref object URL)
    {
        MessageBox.Show(URL.ToString());
    }

}

}

これを行う方法を教えてください。

4

0 に答える 0