🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.pascal.delphi.misc
Article #130

Re: How to disable Window's moving & resizing?

#130
From: Francois Labonte
Date: Thu, 18 Jun 1998 00:00
50 lines
2111 bytes
Hi Ted. First, put your WindowState to maximize and then try:
...
  private
    { Private declarations }
  Done : Boolean;
  Procedure WMWindowPosChanging(Var Msg: TWMWindowPosChanging); Message
WM_WindowPosChanging;
...
procedure TForm1.FormActivate(Sender: TObject);
begin
Done := True;
end;
...
Procedure TForm1.WMWindowPosChanging;
Begin
If Done Then
  Msg.WindowPos^.Flags := Msg.WindowPos^.Flags or SWP_NOMOVE or SWP_NOSIZE;
End;


Hope this helps

\Francois


> Hello,
>
> In Delphi, how can I make a Window
>
> - run in full screen mode
> - no resizing
> - cannot be moved ?
>
> I have tried to set
>
>   WindowState=maximize
>
> However the window will still be "restored" to a "normal" Window when double
> click on the Window Title. Once it is a normal window,  the user can move the
> Window around by using the mouse cursor.
>
> Any suggestion will be very appreciated.
>
> Thanks
>
> Ted.
>
> -----== Posted via Deja News, The Leader in Internet Discussion ==-----
> http://www.dejanews.com/   Now offering spam-free web-based newsreading
Technical Details
Message-ID: <358952B2.F4AA3AB8@iname.com>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <6mbfe4$raq$1@nnrp1.dejanews.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 1091e5,f8955f0a139e6bdd
X-Google-Attributes: gid1091e5,public
X-Google-Thread: fd817,f8955f0a139e6bdd
X-Google-Attributes: gidfd817,public
X-Google-Thread: 10a296,f8955f0a139e6bdd
X-Google-Attributes: gid10a296,public
X-Google-Thread: 10baee,f8955f0a139e6bdd
X-Google-Attributes: gid10baee,public
From: Francois Labonte <labontef@iname.com>
Subject: Re: How to disable Window's moving & resizing?
Date: 1998/06/18
Message-ID: <358952B2.F4AA3AB8@iname.com>
X-Deja-AN: 363928841
Content-Transfer-Encoding: 7bit
References: <6mbfe4$raq$1@nnrp1.dejanews.com>
Mime-Version: 1.0
To: tdj@mail.com
Content-Type: text/plain; charset=us-ascii
X-Complaints-To: newsabuse@supernews.com
X-Trace: 898192489 ZCZSLWF4G46EBCDCDC usenet52.supernews.com
Organization: The World's Usenet -- http://www.Supernews.com
Newsgroups: comp.lang.pascal.delphi.misc,alt.comp.lang.borland-delphi,borland.public.delphi.winapi,borland.public.delphi.graphics