Autor Beitrag
Zimond
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 49



BeitragVerfasst: Do 06.05.04 17:09 
Die Delphi Hilfe sagt zwar geht nich aber gib es trotzdem eine möglichkeit ein MDIChild Formular ohne Rand zu erstellen?
galagher
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 2562
Erhaltene Danke: 46

Windows 10 Home
Delphi 10.1 Starter, Lazarus 2.0.6
BeitragVerfasst: Sa 08.05.04 17:41 
Zimond hat folgendes geschrieben:
Die Delphi Hilfe sagt zwar geht nich aber gib es trotzdem eine möglichkeit ein MDIChild Formular ohne Rand zu erstellen?


Hallo! Hoffe, du kannst das noch gebrauchen! Damit hast du zwar immer noch einen ganz schmalen Rahmen, aber keine Titelleiste. Was Besseres habe ich leider nicht! (Form2 ist hier das MDIChild).

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
procedure TForm2.FormCreate(Sender: TObject);
begin
 BorderStyle := bsSingle;
 HideTitlebar(Form2);
end;

{Titelzeile nicht sichtbar}
procedure HideTitlebar(Form: TForm);
var 
  Style: Longint; 
begin
 with Form do
 begin
  if BorderStyle = bsNone then Exit;
  Style := GetWindowLong(Handle, GWL_STYLE);
  if (Style and WS_CAPTION) = WS_CAPTION then
  begin
   case BorderStyle of
     bsSingle,
     bsSizeable: SetWindowLong(Handle, GWL_STYLE, Style and
         (not (WS_CAPTION)) or WS_BORDER);
     bsDialog: SetWindowLong(Handle, GWL_STYLE, Style and
         (not (WS_CAPTION)) or DS_MODALFRAME or WS_DLGFRAME);
   end;
   Height := Height - GetSystemMetrics(SM_CYCAPTION);
   Refresh;
  end;
 end
end;

_________________
gedunstig war's - und fahle wornen zerschellten karsig im gestrock. oh graus, es gloomt der jabberwock - und die graisligen gulpen nurmen!