Beginner. Getting mouse pointer position

G

Gerhard

Hi.
I need to get in some way the X,Y coordinates of the mouse
pointer when I click over a drawing.
I have made a small database to introduce defects during a
quality control and I need to point as exactly as possible
the position of the faults over the drawing of the objetcs
so later, I can make point graphics over the drawing to
show where are the defects..


Thanks
 
D

Dirk Goldgar

Gerhard said:
Hi.
I need to get in some way the X,Y coordinates of the mouse
pointer when I click over a drawing.
I have made a small database to introduce defects during a
quality control and I need to point as exactly as possible
the position of the faults over the drawing of the objetcs
so later, I can make point graphics over the drawing to
show where are the defects..


Thanks

An event procedure for the MouseDown event will receive the X and Y
coordinates.
 
G

Guest

-----Original Message-----


An event procedure for the MouseDown event will receive the X and Y
coordinates.

--
Dirk Goldgar, MS Access MVP
www.datagnostics.com

(please reply to the newsgroup)


.
Thanks
And where (in wich variable) can I find the coordinates?
 
D

Dirk Goldgar

Thanks
And where (in wich variable) can I find the coordinates?

If you set the event property On Mouse Down (on the event tab of a
control or form section's property sheet) to "[Event Procedure]", and
then click the build button (captioned "...") at the end of the property
line, Access will create and display the shell of an event procedure for
that event, which will look like this:

Private Sub YourControlName_MouseDown(Button As Integer, Shift As
Integer, X As Single, Y As Single)

End Sub

Whenever the event procedure is called, the X and Y arguments will
contain the x and y coordinates of the cursor at the time the button was
pressed. See the online help for the MouseDown event and its event
procedure for more information.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top