Question to coordinates.

Post Reply
User avatar
byte-one
Posts: 1048
Joined: Mon Oct 24, 2005 9:54 am
Location: Austria
Contact:

Question to coordinates.

Post by byte-one »

Hello, in which way i become the screen-coordinates from the actual focused control?
Regards,
Günther
---------------------------------
office@byte-one.com
User avatar
cnavarro
Posts: 5792
Joined: Wed Feb 15, 2012 8:25 pm
Location: España

Re: Question to coordinates.

Post by cnavarro »

Try with ClientToScreen Function
C. Navarro
Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noción del tiempo
Si alguien te dice que algo no se puede hacer, recuerda que esta hablando de sus limitaciones, no de las tuyas.
User avatar
byte-one
Posts: 1048
Joined: Mon Oct 24, 2005 9:54 am
Location: Austria
Contact:

Re: Question to coordinates.

Post by byte-one »

Cristobal, ok, but from where i become the actual focused control??
Regards,
Günther
---------------------------------
office@byte-one.com
User avatar
ukoenig
Posts: 3981
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany
Contact:

Re: Question to coordinates.

Post by ukoenig »

Günther,

You can use :

@ 185, 810 GET oGet[1] VAR nAge SIZE 30, 22 PICTURE "99" PIXEL UPDATE
oGet[1]:bLClicked := {|| aSize := GET_SIZE( oGet[1] ), ;
MsgAlert( "Top : " + ALLTRIM(STR(aSize[1])) + CRLF + ; // only for test
"Left : " + ALLTRIM(STR(aSize[2])) + CRLF + ;
"Width : " + ALLTRIM(STR(aSize[3])) + CRLF + ;
"Height : " + ALLTRIM(STR(aSize[4])), "Size" ) }

// ------------

STATIC FUNCTION GET_SIZE( oObject )
LOCAL aCors[4]

aCors[1] := oObject:nTop
aCors[2] := oObject:nLeft
aCors[3] := oObject:nWidth
aCors[4] := oObject:nHeight

RETURN aCors

regards
Uwe :D
Since 1995 ( the first release of FW 1.9 )
i work with FW.
If you have any questions about special functions, maybe i can help.
User avatar
byte-one
Posts: 1048
Joined: Mon Oct 24, 2005 9:54 am
Location: Austria
Contact:

Re: Question to coordinates.

Post by byte-one »

Hello, Uwe! The problem for me is to determine automatically the actual focused object. Then i can use your function for the coordinats.
Regards,
Günther
---------------------------------
office@byte-one.com
User avatar
nageswaragunupudi
Posts: 8017
Joined: Sun Nov 19, 2006 5:22 am
Location: India
Contact:

Re: Question to coordinates.

Post by nageswaragunupudi »

hWnd := GetFocus()
Regards

G. N. Rao.
Hyderabad, India
User avatar
ukoenig
Posts: 3981
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany
Contact:

Re: Question to coordinates.

Post by ukoenig »

Günther,

have a look at this test :

http://forums.fivetechsupport.com/viewt ... =3&t=36956

regards
Uwe :D
Since 1995 ( the first release of FW 1.9 )
i work with FW.
If you have any questions about special functions, maybe i can help.
Post Reply