I forget to tell the SVN revision is: 13366 (2007-12-18).

2007/12/19, Fabio Dell'Aria <[EMAIL PROTECTED]>:
>
> Hi,
>
> I have created a Patch able to get/set Form (screen related) coordinates.
>
> I have just tested it on Win32/Gtk2/QT interfaces.
>
> This path add the following new functions to the TCustomForm class:
>
> function GetWindowOnScreenRect(var ScreenRect: TRect): Boolean;
> function SetWindowOnScreenRect(const ScreenRect: TRect): Boolean;
>
> PS: it works ONLY on just showed forms (Visible = True).
>
> Can you study it and tell back to me your opinion, please?
>
> 2007/12/17, Mattias Gaertner <[EMAIL PROTECTED]>:
> >
> > 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
> >
>
>
>
> --
> Best regards...
>
> Fabio Dell'Aria.
>
>


-- 
Best regards...

Fabio Dell'Aria.

Reply via email to