[Lazarus] Unmoveable forms?

Luca Olivetti luca at wetron.es
Wed Apr 16 22:39:19 CEST 2008


En/na Felipe Monteiro de Carvalho ha escrit:
> On Wed, Apr 16, 2008 at 11:12 AM, Luca Olivetti <luca at wetron.es> wrote:
>> With delphi I used a trick involving windows messages to make a form
>>  unmoveable:
> 
> I don't think this is implementable in a cross-platform way. On X11
> the conection with the window manager is loose, and it may ignore any
> request you make.

Well, I just need it under windows right now, it would just be nice if 
it could be done in a cross platform way, but it's not a strict requirement

> If you don't want the user to move the form and set the borderstyle to
> bsNone. You can paint your own title if you really need one.

Oh, but I like the system-drawn title bar with the application icon and 
the big X to close the form ;-)

> 
> Having said that, I can't imagine why one would wish to do this.

My main reason is that the layout of the screeen(s) has to be fixed, 
besides avoiding the dragging of the form avoids freezing threads 
waiting on a Synchronize (though dragging a scrollbar will freeze them 
anyway, and that's really bad for my application).
I'm not the only one with such a need (i.e. unmoveable forms), since I 
found that trick somewhere in the internet many years ago.

Bye
-- 
Luca Olivetti
Wetron Automatización S.A. http://www.wetron.es/
Tel. +34 93 5883004      Fax +34 93 5883007



More information about the Lazarus mailing list