Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to remove the title bar from a form

Does anyone know how to create a Delphi form without a title bar? I have seen some some links/tips but its not exactly what I want and I couldn't do it myself.

This is what I am trying to achieve:

enter image description here

like image 546
Hatem Hidouri Avatar asked Dec 08 '12 20:12

Hatem Hidouri


People also ask

How to remove title bar from Windows Form in c#?

if by Blue Border thats on top of the Window Form you mean titlebar, set Forms ControlBox property to false and Text property to empty string ("").

How hide title bar in Windows form in VB net?

Actually you can hide the title bar during runtime (i found a way to do this), by hiding the form before you change the borderstyle to 0(/none) and then show it back again. I used a checkbox to toggle it from 0 to 1/2/3/4/5. AND it works even if it has a value in TEXT property.

How do I remove a form from my taskbar?

To prevent your form from appearing in the taskbar, set its ShowInTaskbar property to False.


2 Answers

First, set BorderStyle to bsNone at design-time. Then declare the procedure CreateParams like so:

type
  TForm1 = class(TForm)
  private
  protected
    procedure CreateParams(var Params: TCreateParams); override; // ADD THIS LINE!
    { Private declarations }
  public
    { Public declarations }
  end;

and implement it like

procedure TForm1.CreateParams(var Params: TCreateParams);
begin
  inherited;
  Params.Style := Params.Style or WS_THICKFRAME;
end;
like image 57
Andreas Rejbrand Avatar answered Oct 21 '22 04:10

Andreas Rejbrand


Set BorderStyle to bsNone in Object Inspector

like image 30
iMan Biglari Avatar answered Oct 21 '22 05:10

iMan Biglari