I read several posts about people asking how to get the cursor’s position. So, I wondered if I could create a program that would draw an arrow pointing towards the cursor. ( Sort of like a compass. )
Well, after a bit of sorting thru old projects and searching the web for a little help with the math, I made a neat and useless program. “Cursor Compass” Just one of those “I made it just to see if I could” things.
Attached is a zip with the VB 6 project files.
I decided to post it to get some feedback, but I also think that it could help people who are new to VB.
It uses the following API Functions.
GetCursorPos(...) and GetWindowRect(...)
It also has code to find the following:
The distance between 2 points and the angle based on 2 points
Let me know what you think.
Keith_VB6
If you have any further questions, just ask.
If this solves things, then please mark the thread resolved.
[Thread Tools] --> [Mark Thread Resolved]
I don't know a lot about complex math. But what it does is calculate the angle or direction of a line based on 2 points or vectors. I may have phrased it incorrectly.
IE. if the "arrow" is pointing up, that would be 90 degrees. I don't know the proper term for what it does. But I still like it.
Keith_VB6
If you have any further questions, just ask.
If this solves things, then please mark the thread resolved.
[Thread Tools] --> [Mark Thread Resolved]