Results 1 to 2 of 2

Thread: Conversion Problems.. Help?? Aaron!!

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Nov 1999
    Posts
    184

    Post

    aaron,

    I have a major ploblem.. I used the function you gave me to find the name of the object.. and thankyou. But I Tried this:

    Dim tPOS As PointAPI
    Dim copy As Variant
    tPOS.x = Slain.Left + PlayBoard.Board(122).Left + (PlayBoard.Board(122).Width / 2)
    tPOS.y = Slain.Top + PlayBoard.Board(122).Top + (PlayBoard.Board(122).Height / 2)
    Call ScreenToClient(hwnd, tPOS)
    copy = FindObject(ScaleX(tPOS.x, vbPixels, vbTwips), ScaleY(tPOS.y, vbPixels, vbTwips))
    MsgBox copy

    To say the least it didnt work. Ones counting in twips and the other in pixels ( i think) .. Help!!

  2. #2
    Guru Aaron Young's Avatar
    Join Date
    Jun 1999
    Location
    Red Wing, MN, USA
    Posts
    2,177

    Post

    Don't use the ScaleX or ScaleY Methods, I used them because the Values returned by GetCursorPos are in Pixels.

    ------------------
    Aaron Young
    Analyst Programmer
    [email protected]
    [email protected]

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