Results 1 to 3 of 3

Thread: Cursor Compass thingy...

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Apr 2006
    Location
    USA
    Posts
    207

    Lightbulb Cursor Compass thingy...

    Hi All,

    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.
    Attached Files Attached Files
    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]

  2. #2
    Member
    Join Date
    Apr 2006
    Location
    Serbia
    Posts
    32

    Re: Cursor Compass thingy...

    haven't looked at your code but:
    ... the angle based on 2 points
    you need at least three points to define an angle....

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Apr 2006
    Location
    USA
    Posts
    207

    Re: Cursor Compass thingy...

    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]

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width