Mouse Position

G

Guest

Hi All

I was wondering if there is a function that give you the mouse position
because a have this one form I want to either double click a control on a
form and to position a frame control beside the mouse?

Any Reply would be greatly appriecated.

Jason
 
N

NickHK

Jason,
The various Mouse events (_MouseDown, _MouseMove, _MouseUp) give the
position of the Mouse:

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

End Sub

Of course, if this is over a control, that control will fire the events
rather than the form.

NickHK
 

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

Top