Transparent Hot Spot

  • Thread starter Thread starter Craig Whatley
  • Start date Start date
C

Craig Whatley

If I have an image for the background of a Windows form, is there a way to
create a hidden hot spot on the image (for example, a hidden panel that I
can click)?

I tried putting a panel onto the form, but can't figure out how to make the
panel transparent so that the image of the form shows through the panel...

Thanks,
Craig Whatley
 
Why not just trap the click in your form itself and then determine if the
co-ordinates fit within the specified hotspot area? - no need to create any
additional control. You may need the SP2 release of .NETCF for this since
not all events were hooked up in the original RTM release.

Peter

--
Peter Foot
Windows Embedded MVP
www.inthehand.com | www.opennetcf.org

Do have an opinion on the effectiveness of Microsoft Windows Mobile and
Embedded newsgroups? Let us know!
https://www.windowsembeddedeval.com/community/newsgroups
 
Peter,

So, I would register a Click event handler for the form and then in the
handler, get the coordinates that were clicked to determine if it is in the
hotspot area? Sounds like a great solution.

What coordinates would I be getting? The coordinates of the mouse, the
cursor, etc.?

Thanks for your quick reply,
Craig
 
Craig said:
Peter,

So, I would register a Click event handler for the form and then in the
handler, get the coordinates that were clicked to determine if it is in the
hotspot area? Sounds like a great solution.

What coordinates would I be getting? The coordinates of the mouse, the
cursor, etc.?

Thanks for your quick reply,
Craig

from msdn :
MouseEventArgs.X : Obtains the X coordinate of the mouse (hum poor
translation as my msnd is in french :p)
MouseEventArgs.Y : I think you'll gess ;)

You haven't precised it but I suppose that your terminal is a PPC or
equivalent so it doesn't have a mouse... So you can imagine that the
coordinates you will get will be the exact position where the stylus
taped the screen when the event has been fired ;)

Hope it answers your question ;)
 
You nailed it on the head -- I am working with a WinCE device that has a
touchscreen interface. This helps immensely. Thanks for your reply!

Craig
 
Back
Top