How can I hide the caption bar on a form? | |||
| |||
The CreateParams method initializes a window-creation parameter record passed in the Params parameter (ref:Delphi Help). Go to the protected/public section on the form and override the CreateParams method by typing the following: procedure CreateParams(var Params: TCreateParams); override;
procedure TForm1.CreateParams(var Params: TCreateParams); begin inherited CreatePArams (Params); with Params do style := (Style or WS_POPUP) and (not WS_DLGFRAME); end;unit Unit1; interface uses Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs; type TForm1 = class(TForm) private { Private declarations } procedure CreateParams(var Params: TCreateParams); override; public { Public declarations } end; var Form1: TForm1; implementation {$R *.DFM} procedure TForm1.CreateParams(var Params: TCreateParams); begin inherited CreatePArams (Params); with Params do style := (Style or WS_POPUP) and (not WS_DLGFRAME); end; end. Tags: Caption Bar Delphi Hide Caption Bar WS_DLGFRAME WS_POPUP | |||
| |||
| |||
Login for comment |