On Mon, 17 Dec 2007 09:27:07 +0100
Tiziano De Togni <[EMAIL PROTECTED]> wrote:

> Fabio Dell'Aria ha scritto:
> > How I can obtain the Form (screen related) coordinates?
> > 
> > 
> > In Delphi I use Left/Top and (Left + Width)/(Top + Height),
> > 
> > but in Lazarus Width=ClientWidth and Height=ClientHeight
> > 
> > so I cannot use the same method.
> > 
> this is a common FUQ for Lazarus (Frequently Unanswered Question)...
> 
> I suppose that you have this problem under windows, try something
> like this:
> 
> var r: TRect;
> ....
> {$IFDEF WIN32}
>    // let's use the win32 APIs
>    getwindowrect(Form1.handle,r);
> 
>    top:= (screen.height-(r.bottom-r.top));
>    left:=(screen.width-(r.right-r.left));
> {$ENDIF}
> {$IFDEF LINUX}
>     top:= (screen.height-height);
>     left:=(screen.width-width);
> {$ENDIF}
> 
> not sure if this issue has been resolved in recent releases of
> Lazarus...

No. See

http://wiki.lazarus.freepascal.org/Lazarus_Faq#Why_are_TForm.ClientWidth.2FClientHeight_the_same_as_TForm.Width.2FHeight


Mattias

_________________________________________________________________
     To unsubscribe: mail [EMAIL PROTECTED] with
                "unsubscribe" as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives

Reply via email to