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

Mouse Arrow Constants

Status
Not open for further replies.

VBpunk

Programmer
Oct 4, 1999
9
0
0
CA
Visit site
<br>
Hey all<br>
<br>
This should be an easy one. I'm trying to find <br>
a constant which represents the current value of<br>
the mouse arrow. I figure there are constants<br>
for time, date, X & Y co-ordinates for the active<br>
window. There should be a constant for the mouse<br>
arrow which tracks the X and Y values no matter<br>
where the user moves the mouse. I've tried every<br>
CurrentX or CurrentY constant which I could find <br>
in the Object Brouser. <br>
<br>
Whadya Say? Any one know the answer ??? <br>
<p>Deryck Ramsahai<br><a href=mailto:DRams.bna@bundy.com>DRams.bna@bundy.com</a><br><a href= > </a><br>It takes two to lie. One to lie and one to listen.
 
Is this in reference to the MousePointer property or the MouseMove event? MousePointer sets the shape of the mouse cursor (as in Form1.MousePointer = vbArrowQuestion) and MouseMove determines the X and Y coordinates of the mouse pointer's position on a form or control and whether a button or shift key is held down while moving the mouse:<br>
<br>
Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)<br>
Label1 = &quot;X=&quot; & X &quot; Y=&quot; & Y & &quot;Button=&quot; & Button & &quot;Shift=&quot; & Shift<br>
End Sub<br>
<br>
Hope this helps.<br>

 
Thanks Alt255<br>
<br>
Your code is exactly what I'm looking for. <p>Deryck Ramsahai<br><a href=mailto:DRams.bna@bundy.com>DRams.bna@bundy.com</a><br><a href= > </a><br>It takes two to lie. One to lie and one to listen.
 
I've tried to use this on MDIForms, but it doesn't seem to work... is there a work-around for that? Best Regards and many Thanks!
Michael G. Bronner X-)

&quot;Life is too Short to Drink Cheap Beer&quot;
 
I think I have narrowed the problem down to this:
The MDIForm won't take MouseMove Events, because there are other objects which are taking it. Is this true? And if so, how do I circumvent this? Best Regards and many Thanks!
Michael G. Bronner X-)

&quot;Life is too Short to Drink Cheap Beer&quot;
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top