The βfixβ I am using is to let the browser tell you that it is dressed, taken a screenshot, and handles normal C # events.
[ComVisible(true)] public class Communicator { private static frmMain m_mainWindow = null; public Communicator(frmMain mainWindow) { m_mainWindow = mainWindow; } public void exit() { m_mainWindow.Close(); } public void DragStarted(object e) { m_mainWindow.DoDragEnterFromScript(); } } private void frmMain_Load(object sender, EventArgs e) { webBrowser1.ObjectForScripting = new Communicator(this);; webBrowser1.Navigate(@"about:blank"); } public void DoDragEnterFromScript() {
And in the html file
var holder = document.getElementsByTagName('body')[0]; holder.ondragover = function () { window.external.DragStarted(event); return true; };
Do not forget to hide the image window after DragLeave / DragDrop
Obble source share