Board index » delphi » Sizeable border but no title?

Sizeable border but no title?

I would like to create a window in Delphi with a sizeable border, but
with no title bar at all.  To see an example, open the windows clock (in
win 3.1) and set it for no title.

If anyone has any idea how to do this, I'm all ears...(and in your debt).

Clint Watson
cwat...@txdirect.net

 

Re:Sizeable border but no title?


Quote
cwat...@txdirect.net (Clint Watson) wrote:
>I would like to create a window in Delphi with a sizeable border, but
>with no title bar at all.  To see an example, open the windows clock (in
>win 3.1) and set it for no title.

Set your BoarderStyle to bsSizeable and then override CreateParams and redeclare it as follows...

type
  TForm1=class(TForm)
    ...
    private
    procedure CreateParams(var Params: TCreateParams); override;
    ...
    end;

procedure TForm1.CreateParams(var Params: TCreateParams);
begin
inherited CreateParams(Params);
Params.Style := WS_POPUP or WS_THICKFRAME or WS_BORDER;
end;

There's some other interesting effects you can get by adjusting the BorderStyle property and the
Param's variable.  Play around with it and see.

Hope that helps.

Jeffrey Huck
jh...@xmission.com
http://xmission.com/~jhuck/delphi.html

Other Threads