Saturday, November 1, 2008

Preventing Image Drag from Browser

If you just want to prevent users from dragging an image from your hosted WebBrowser control, there is no need to implement IDropSource or anything. You can do this by simply adding
onmousemove='return false;' to your IMG tag. I wasted a lot of time on this, but it has nothing to do with the WebBrowser control, all you need is this simple HTML/JavaScript snippet.

No comments: