Results 1 to 6 of 6

Thread: coords handles?

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Jun 1999
    Location
    ma,usa
    Posts
    485

    coords handles?

    I might be wrong but maybe someone here can help...
    Is there a simpler way to use (get, store, and pass) a co-ordinate(X,Y) as a Long without having to break it down and build it again using typepointAPI? It just seams redundant to me to get the point (probably stored as a long) have vb turn it into x,y and then store it as a userdefined type. Shouldn't I be able to just get and use the same coord as one long number without the conversions?

  2. #2
    I don't do your homework! opus's Avatar
    Join Date
    Jun 2000
    Location
    Good Old Europe
    Posts
    3,863
    Why should that be a problem. I'm using a Type to store x,y datas. In the code I can easily see what is ment (Position.x Position.y). You're right for the storing, but that's no problem to me to store them seperatly. And it is the same way for the storing as in the code, you can more easily understand the values.
    You're welcome to rate this post!
    If your problem is solved, please use the Mark thread as resolved button


    Wait, I'm too old to hurry!

  3. #3
    jim mcnamara
    Guest
    FYI - if you learn C++ you'll discover the POINT structure - which is the same as the dataype PointAPI in VB.

    In memory is really two two-byte integers. The PointAPI UDT is a copy of what is in memory.

    Now, what specifically is the issue in working with PointAPI?

  4. #4
    I don't do your homework! opus's Avatar
    Join Date
    Jun 2000
    Location
    Good Old Europe
    Posts
    3,863
    Why do call this UDT PointAPI, it is not an API. That's confusing!
    You're welcome to rate this post!
    If your problem is solved, please use the Mark thread as resolved button


    Wait, I'm too old to hurry!

  5. #5
    Kitten CornedBee's Avatar
    Join Date
    Aug 2001
    Location
    In a microchip!
    Posts
    11,594
    from windef.h:
    typedef struct tagPOINT
    {
    LONG x;
    LONG y;
    } POINT, *PPOINT, NEAR *NPPOINT, FAR *LPPOINT;

    POINT contains two 4-byte signed integers, equivalent to Long in VB.
    All the buzzt
    CornedBee

    "Writing specifications is like writing a novel. Writing code is like writing poetry."
    - Anonymous, published by Raymond Chen

    Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.

  6. #6

    Thread Starter
    Hyperactive Member
    Join Date
    Jun 1999
    Location
    ma,usa
    Posts
    485
    The reason I wanted to know this is I'm making a keyboard and mouse movement and action recording program as my last hurrah to VB before moving on to C++ and it would keep my file size smaller if I could record mouse movements as a long without having to type them and assign it as a long instead of x,y. Thanks for the help confirming it can't be done.

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