Autor Beitrag
derDoc
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 623

Win Vista Prof
D2007 Prof
BeitragVerfasst: Do 29.01.04 18:20 
Hallo

ich habe folgendes Problem:

Ich habe ein Formular, in dessen Titelleiste ich einen 4. Knopf eingebaut habe. Dieser soll das Formular einklappen (ähnlich wie bei Linux).
Wenn ich dem Formular jetzt eine neue Höhe zuweise (ClientHeight := 0), dann wird diese wieder auf 50 gesetzt, sodass ein schmaler Streifen noch zu sehen ist.

Gibt es irgend welche Möglichkeiten das zu realisieren, bzw. zum Laufen zu bringen?

_________________
MfG derDoc
There are only 10 types of people: those who understand binary and those who don't.
Chatfix
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 1583
Erhaltene Danke: 10

Win 10, Win 8, Win 7, Win Vista, Win XP
VB.net (VS 2015), MsSQL (T-SQL), HTML, CSS, PHP, MySQL
BeitragVerfasst: Do 29.01.04 20:12 
Zitat:
ausblenden volle Höhe 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:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
{ 
  In order to allow very small windows, 
  you need to override the default behavior for Windows message WM_GETMINMAXINFO. 
  This message is sent to your window by the OS in order to find out 
  the minimum and the maximum allowed window size. 
  You can do this by adding this method procedure to your form: 
}
 

private 
  procedure GetMinMaxInfo(var Msg: TWMGETMINMAXINFO); message WM_GETMINMAXINFO; 
  { Private declarations } 
public 
  { Public declarations } 
end; 

var 
  Form1: TForm1; 

implementation 

{$R *.dfm} 

procedure TForm1.GetMinMaxInfo(var Msg: TWMGETMINMAXINFO); 
begin 
  inherited; 
  with Msg.MinMaxInfo^ do 
  begin 
    ptMinTrackSize.X := 0; // min. Width 
    ptMinTrackSize.Y := 0; // min. Height 
  end; 
end; 

procedure TForm1.FormCreate(Sender: TObject); 
begin 
  { no systemmenu } 
  BorderIcons := BorderIcons - [biSystemMenu]; 
  { set the form's width & height } 
  Width := 80; 
  Height := 60; 
end;


Quelle: ...die Breite einer TForm kleiner als 112 Pixels machen?

_________________
Gehirn: ein Organ, mit dem wir denken, daß wir denken. - Ambrose Bierce