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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Mouse Position

Status
Not open for further replies.

jnrdavo

Programmer
Jan 8, 2003
11
I'm working on a routine that will allow a user to right click on the screen and bring up a poup screen (form).

I'm using the docmd.movesize command which works fine, but can't find out where the user clicked (I'm using onmousedown).

Anybody suggest an answer to the current click location?

Thanks in advance, Stuart.
 
Try using the detail_MouseDown event and check for button 2

Danny

Never Think Impossible
 
Thanks Danny, that is what I am doing.

I've developed a bit further, but am still stuck.

I'm using the mousedown event and pass through the X and Y coordinates to my routine:

fn_open_popup(me, "hello","you",X,Y)

the function just opens a form and does a few checks.. Here is the onload part of the form:

---

DoCmd.MoveSize Val(iX), Val(iY)

It seems to move the form, but doesn't move it to where the mouse click was. Do they both use the same measurements (twips)?

 
I'm not sure but I think that one will be using Screen relative co-ordinates and the other Application relative.


Hope this helps.
 
thanks earthandfire, can anybody confirm that this is true?

Does anybody have a popup routine that works that will popup a form where ever you have clicked on another form?
 
>>>Does anybody have a popup routine that works that will popup a form where ever you have clicked on another form?
Code:
Private Sub Detail_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
    If Button = acRightButton Then
        MsgBox "Do Anything"
    End If
End Sub
earthandfire said:
I'm not sure but I think that one will be using Screen relative co-ordinates and the other Application relative
Yes you need to go for POINAPI. See ClientToScreen At All API

________________________________________________________________________
Zameer Abdulla
Visit Me
No two children are alike - particularly if one is yours and the other isn't.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top