Delphi-PRAXiS

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Library: VCL / WinForms / Controls (https://www.delphipraxis.net/24-library-vcl-winforms-controls/)
-   -   Delphi Formulare ohne Titelleiste ohne "bsnone" (https://www.delphipraxis.net/56072-formulare-ohne-titelleiste-ohne-bsnone.html)

cruso 31. Okt 2005 18:28


Formulare ohne Titelleiste ohne "bsnone"
 
Wenn man ein Formular ohne Titelleiste anzeigen will, dann fällt einem wohl zuerst die BorderStyle-Eigenschaft bsnone ein. Allerdings sieht ein solches Fenster sehr trostlos aus, weil ein Rahmen fehlt. Mit dem folgenden Code kann man die Titelleiste ausblenden ohne bsnone zu benutzen:

Delphi-Quellcode:
procedure TForm1.FormCreate(Sender: TObject);
begin
  SetWindowLong(Handle, GWL_STYLE, (GetWindowLong(Handle, GWL_STYLE) and not WS_Caption));
  ClientHeight := Height;  //Ist besser so ;-)
  Refresh;
end;
Wichtig: Die BorderStyle-Eigenschaft darf auf keinen Fall bsnone sein, denn sonst wäre die Mühe umsonst!

[edit=Chakotay1308]Ein bisschen Ordnung muss auch im Source sein... Mfg, Chakotay1308[/edit]


Alle Zeitangaben in WEZ +1. Es ist jetzt 00:11 Uhr.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz