一个奇怪的Win7+IE9 BHO问题
我在Microsoft All-In-One Code Framework中找到一个BrowserHelperObject示例,在XP下运行正常,但在Win7+ie9下却出现了问题。而且两台Win7+ie9的问题居然不同。
我在该示例中只加了一句
void ieInstance_DocumentComplete(object pDisp, ref object URL) { string url = URL as string; if (string.IsNullOrEmpty(url) || url.Equals("about:blank", StringComparison.OrdinalIgnoreCase)) { return; } InternetExplorer explorer = pDisp as InternetExplorer; // Set the handler of the document in InternetExplorer. if (explorer != null) { MessageBox.Show(url);//这句是我加的 SetHandler(explorer); } }