Entwickler-Ecke

Sonstiges - ...die Minimale und Maximale Größe einer Form bestimmen?


wwerner - Di 16.07.02 13:42
Titel: ...die Minimale und Maximale Größe einer Form bestimmen?
Lösung für D3

In den interfaceteil deiner Form


Delphi-Quelltext
1:
2:
3:
4:
5:
TfrmMain = class(TForm) 
  ...... 
  private 
    procedure wmGetMinMaxInfo(var Msg : TMessage); Message wm_GetMinMaxInfo; 
.....


Implementationsteil


Delphi-Quelltext
1:
2:
3:
4:
5:
6:
procedure TfrmMain.wmGetMinMaxInfo(var Msg : TMessage); {begenzt die erlaubte Formulargröße} 

begin 
  PMinMaxInfo(Msg.lParam)^.ptMinTrackSize := Point(640 ,480); 
  PMinMaxInfo(Msg.lParam)^.ptMaxTrackSize := Point(1024,768); 
end;