geting the location of the cursor relative to the form  
Author Message
fatquack





PostPosted: Visual Basic Express Edition, geting the location of the cursor relative to the form Top

i would like to get the location of the cursor relative to the form. when i try 'cursor.position' it work but it gets the position of the cursor relative to the whole screen so if the mouse was 300 pxls away from the top of the screen but 20 pxls away from the top of the form, if i did 'control1.location=cursor.position' it would move it 300 pxls away from the top of the form.



Visual Studio Express Editions10  
 
 
nobugz





PostPosted: Visual Basic Express Edition, geting the location of the cursor relative to the form Top

Use Me.PointToClient() to convert the coordinates.