![]() |
[Source] Getting X And Y Coordinates [VB6.0]
:
Private Declare Function GetCursorPos Lib "user32" (lpPoint As POINTAPI) As LongAdd an Timer called timer1. Add two labels called x and Y. Set the timer1.interval to 5 Last but not least Put the code in the form. Finito u just made x and y coordinates |
^^Yep.. that does indeed work, but I usually prefer using a function and a with statement to get the job done.. because whenever I use this API.. I have to use it alot :\.. anyways, My favorite way to do it is below.. but his words too :D
:
Private Declare Function GetCursorPos Lib "user32" (lpPoint As POINTAPI) As Long |
This code is quite common. No offense though. Might help some new people. Just as a note, I first saw this code in the API guide. If your really into VB, then you should have it. Just google "API Guide".
|
| All times are GMT -5. The time now is 9:31 AM. |
Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC