Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Mouse position in Pixels

Status
Not open for further replies.

Romain

Programmer
Nov 5, 2001
3
FR
I would like to get the position of the cursor of my mouse with the pixel unit. I know get this position with mrow() end mcol() but this values are returned in fonction of the fontsize object... And some objects haven't got this property (ex : picture). Thanks for your help.
 
Nouvellon,

In the MouseDown event, the parameters nXCoord & nYCoord are passed. According to the help these...

"Contains the current horizontal (nXCoord) and vertical (nYCoord) position of the mouse pointer within the form. These coordinates are expressed in terms of the form's coordinate system in the unit of measurement specified by the ScaleMode property of the form."

You could also check out SYS(1270)

Hope that helps,

Stewart
 
If you use a second parameter of 3 on the MROW() and MCOL() functions, it will return pixels.
 
To BoDurban :
I would like use the second parameter of the mrow() and mcol() functions as you said but I haven't got success. Actually, I don't know if this functions have 3 parameters. My help file (fox 3) give me only one. If I try 3 parameters on fox 6, I have an error on number of arguments... Furthermore, I'm french and I don't know if understand your reply very well. Could you just give an example of syntaxe...?
 
Thanks a lot to both of you, I used the nxcoord and nycoord of the mouse move event and I have that I want.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top