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:
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 ("").
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.
To prevent your form from appearing in the taskbar, set its ShowInTaskbar property to False.
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;
Set BorderStyle
to bsNone
in Object Inspector
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With