clicking on an image
Hello,
I am not sure if this is possible but I just want to know. I am trying to write an excel macro with which I should be able to insert an image (gray scale - gif) into a sheet and then comes the hard part: I should be able to move the mouse over the image and when I click on a specific location on the image, I should get the pixel coordinates(X,Y) stored in another sheet. I am basically trying to trace out some specific features in the image files that I have. Please let me know how to approach this problem. Thanks for your help. Srikanth *** Sent via Developersdex http://www.developersdex.com *** Don't just participate in USENET...get rewarded for it! |
clicking on an image
You could try using an Image control and loading up your image in this? The use the image controls mousdown event to get your values eg Private Sub Image1_MouseDown(ByVal Button As Integer, ByVal Shift A Integer, ByVal X As Single, ByVal Y As Single) With Worksheets("Sheet2") .Range("A65536").End(xlUp).Offset(1, 0) = X .Range("B65536").End(xlUp).Offset(1, 0) = Y End With End Sub Srikanth Ganesan Wrote: Hello, I am not sure if this is possible but I just want to know. I am trying to write an excel macro with which I should be able to insert an image (gray scale - gif) into a sheet and then comes th hard part: I should be able to move the mouse over the image and when I click o a specific location on the image, I should get the pixe coordinates(X,Y) stored in another sheet. I am basically trying to trace out some specific features in the image files that I have. Please let me kno how to approach this problem. Thanks for your help. Srikanth *** Sent via Developersdex http://www.developersdex.com *** Don't just participate in USENET...get rewarded for it -- Ivan F Moal ----------------------------------------------------------------------- Ivan F Moala's Profile: http://www.excelforum.com/member.php...nfo&userid=195 View this thread: http://www.excelforum.com/showthread.php?threadid=27347 |
All times are GMT +1. The time now is 03:52 PM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com