Image Mouse events

LineCutter

Active Member
Licensed User
Longtime User
I may well have missed something here, but I'd like to be able to trap mouse/stylus events within an image, rather than having to display the graphics on the form.

e.g. Image_mouseUp(x,y) instead of Form1_MouseUp(x,y)
 

RandomCoder

Well-Known Member
Licensed User
Longtime User
I had a similar problem to this but as a work around I drew the image on the ForeLayer of the form, then caught the colour of the Forelayer that was not occupied by the image. Each time the MouseDown event was triggered I use the FGetPixel command to test the colour at that point and if it is different to the colour of the ForeLayer then I know that the image has been clicked

Hope this little work around helps.

Regards,
RandomCoder
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…