Autor Beitrag
Tino
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Veteran
Beiträge: 9839
Erhaltene Danke: 45

Windows 8.1
Delphi XE4
BeitragVerfasst: Mo 30.12.02 11:25 
herausfinden, wann eine Form min. oder maximiert wird?

Im Interface-Abschnitt der Form (Form1) folgendes einfügen:
ausblenden Delphi-Quelltext
1:
2:
private 
  Procedure WMSysCommand (Var Msg: tWMSysCommand); Message WM_SYSCOMMAND;

Die Implementation sieht wie folgt aus:
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
Procedure tForm1.WMSysCommand (Var Msg: tWMSysCommand);
Begin
  If Msg.CmdType = SC_MINIMIZE Then
    ShowMessage ('Minimize')
  Else If Msg.CmdType = SC_MAXIMIZE Then
    ShowMessage ('Maximize');
  DefaultHandler (Msg);
End;

Moderiert von user profile iconjasocul: Beitrag geprüft am 22.05.2006