[Lazarus] How do you remove form caption area?

silvioprog silvioprog at gmail.com
Sat Oct 5 16:32:29 CEST 2013


uses
  unit2;

procedure TForm1.Button1Click(Sender: TObject);
begin
  Form2 := TForm2.Create(Self);
  Form2.ShowModal;
  Form2.Free;
end;

---

uses
  Windows;

procedure TForm2.FormShow(Sender: TObject);
begin
  SetWindowLong(Handle, GWL_STYLE,
    GetWindowLong(Handle, GWL_STYLE) and (not WS_CAPTION));
  SetWindowPos(Handle, HWND_TOPMOST, 0, 0, 0, 0,
    SWP_DRAWFRAME or SWP_NOMOVE or SWP_NOSIZE);
end;

-- 
Silvio Cl├ęcio
My public projects - github.com/silvioprog
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20131005/f75eddeb/attachment-0003.html>


More information about the Lazarus mailing list