Mouse is over a picture in IE control

iane87
05-08-2004, 07:50 PM
How do I tell if the mouse is over a picture in the IE control?

MikeJ
05-08-2004, 08:02 PM
There is no really good way to figure this out. Because the picture is inside a webpage, and that can be scrolled, you can't see where it might be. Think of it as standing on one side of a brick wall, and trying to see if something is moving on the other side.

---

However, if this image is the only thing on the page, you can make it so the browser doesn't scroll, and set up a region where if the mouse moves in this region, you can assume it is going over the picture. To do this you can set it as simple as using SetCapture to keep the mouse events only on the form, and then to check the cursor position in the MouseMove event and seeing if that meets the area taken up by the webbrowser control.

Back to the previous example, think of this as the only area on the other side of the wall something is moving. You can go ahead and say where it is, because you know it *has* to be there.

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum