PDA

Click to See Complete Forum and Search --> : Conversion Problems.. Help?? Aaron!!


Dayo312
Dec 9th, 1999, 03:48 AM
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!!

Aaron Young
Dec 9th, 1999, 03:57 AM
Don't use the ScaleX or ScaleY Methods, I used them because the Values returned by GetCursorPos are in Pixels.

------------------
Aaron Young
Analyst Programmer
aarony@redwingsoftware.com
adyoung@win.bright.net