Autor Beitrag
MH1987
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 98



BeitragVerfasst: So 13.05.07 22:33 
Hi,

ich würde gerne das Ereignis, wenn jemand bei dem Formular auf das Maximieren Symbol drückt, mit einer eigenen Prozedur bestimmen.

Kann mir jemand sagen wie das geht?

Gruß,
MH1987


Moderiert von user profile iconChristian S.: Topic aus Delphi Language (Object-Pascal) / CLX verschoben am Mo 14.05.2007 um 10:06
alias5000
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 2145

WinXP Prof SP2, Ubuntu 9.04
C/C++(Code::Blocks, VS.NET),A51(Keil),Object Pascal(D2005PE, Turbo Delphi Explorer) C# (VS 2008 Express)
BeitragVerfasst: So 13.05.07 23:04 
Wenn ich das diesem Artikel richtig entnehme, musst du die WM_SYSCOMMAND abfangen und der wparam muss auf sc_maxmize sein. Irgendwie sowas habe ich auch noch ganz dunkel in Erinnerung..

Gruß
alias5000

_________________
Programmers never die, they just GOSUB without RETURN
Blackheart666
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 2195

XP
D3Prof, D6Pers.
BeitragVerfasst: So 13.05.07 23:11 
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
public
    { Public-Deklarationen }
    procedure WMSysCommand(var Msg: TWMSysCommand); message WM_SYSCOMMAND;
  end;

var
  Form1: TForm1;

implementation

{$R *.dfm}

procedure TForm1.WMSysCommand;
begin
  if (Msg.CmdType = SC_MAXIMIZE) then ShowMessage('Maximiert');
  DefaultHandler(Msg);
end;

_________________
Blackheart666
Der Irrsinn ist bei Einzelnen etwas Seltenes, - aber bei Gruppen, Parteien, Völkern, Zeiten die Regel. (Friedrich Nietzsche)
MH1987 Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 98



BeitragVerfasst: Mo 14.05.07 01:52 
Super, also mit dem Knopf zum Maximieren klappts schon mal.
Jedoch kann man noch mit dem doppelklick auf die Leiste oben maximieren, welches nicht abgefangen wird!

Gibt es dann da auch ein Command für?

Gruß,
MH1987
Lannes
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 2352
Erhaltene Danke: 4

Win XP, 95, 3.11, IE6
D3 Prof, D4 Standard, D2005 PE, TurboDelphi, Lazarus, D2010
BeitragVerfasst: Mo 14.05.07 14:02 
Hallo,

such mal nach WM_NCLBUTTONDBLCLK, das hilft.

_________________
MfG Lannes
(Nichts ist nicht Nichts) and ('' <> nil ) and (Pointer('') = nil ) and (@('') <> nil )
MH1987 Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 98



BeitragVerfasst: Mo 14.05.07 14:42 
hmm,

ich habs jetzt so versucht aber das klappt nicht:

ausblenden Delphi-Quelltext
1:
2:
3:
4:
Case Msg.CmdType of
  SC_MAXIMIZE: ...
  WM_NCLBUTTONDBLCLK: ...
end;


Hab ich die Abfrage falsch? Ich benutze das erste Mal eine Message.

Gruß,
MH1987
ZeitGeist87
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 1593
Erhaltene Danke: 20

Win95-Win10
Delphi 10 Seattle, Rad Studio 2007, Delphi 7 Prof., C++, WSH, Turbo Pascal, PHP, Delphi X2
BeitragVerfasst: Mo 14.05.07 14:46 
Gibts nicht in irgend ner Palette sowas wie nen ActionListener, den man auf die Form droppt und der gewisse Ereignisse abfangen kann??

Lg
Stefan

_________________
Wer Provokationen, Ironie, Sarkasmus oder Zynismus herauslesen kann soll sie ignorieren um den Inhalt meiner Beiträge ungetrübt erfassen zu können.
MH1987 Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 98



BeitragVerfasst: Mo 14.05.07 15:05 
hmm,

wüsst ich nicht
Marco D.
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 2750

Windows Vista
Delphi 7, Delphi 2005 PE, PHP 4 + 5 (Notepad++), Java (Eclipse), XML, XML Schema, ABAP, ABAP OO
BeitragVerfasst: Mo 14.05.07 15:21 
Es gibt die Komponente TApplicationEvents. Diese auf die Form ziehen und das Ereignis OnMaximize verwenden.

_________________
Pascal keeps your hand tied. C gives you enough rope to hang yourself. C++ gives you enough rope to shoot yourself in the foot
Lannes
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 2352
Erhaltene Danke: 4

Win XP, 95, 3.11, IE6
D3 Prof, D4 Standard, D2005 PE, TurboDelphi, Lazarus, D2010
BeitragVerfasst: Mo 14.05.07 15:22 

_________________
MfG Lannes
(Nichts ist nicht Nichts) and ('' <> nil ) and (Pointer('') = nil ) and (@('') <> nil )