且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

Super Drag BHO for IE9 (C#)

更新时间:2022-08-12 21:33:23

A nab of mine wants a IE9 BHO with superdrag.

 

The purpose of writing this article is just for a record. Though it is easy, the process of studing on it is not easy, which took me more one night to search related information. Also, the moment when worked it out is delightful.

 

First of all, thanks Tian Fang for his post. (Click here to link to his article)

 

He extended almost all the code for superdrag, the only thing perplexed me is it doesn't work anyway.

I tried to rewrite some code, a different way to get the same result and still can't solve this.

So I have to set some dialog to figure out what is the problem and found that it will fail when goes to

 

var rootElementEvents = document.documentElement as HTMLElementEvents_Event; rootElementEvents.ondragover += () => false; rootElementEvents.ondrop += () => { SuperDragDrop(); return false; };

 

After searching in Google, the reason is the object he used is not correct. We should use HTMLElementEvents2_Event object in this project. Just change it, build and install the BHO.

Have fun!