Autor Beitrag
Killmag10
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 297

Suse Linux / DOS / Windows All In One ;)
D4 / D2005
BeitragVerfasst: So 24.08.03 17:31 
ich hab mal ne frage gibt es ein ereigniss das gestartet wird wenn das fenster Maximiert wird ?

das problem
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
sini1.Clear;
//ini file
sini1.Add('zeiten:');//    0
sini1.Add(uhrzeit1);//      1
sini1.Add(uhrzeit2);//      2
sini1.Add('---------');//  3
sini1.Add(inttostr(form1.Top)); //top      4
sini1.Add(inttostr(form1.Left)); //left     5
sini1.Add(inttostr(form1.Height));//Height  6
sini1.Add(inttostr(form1.Width));//Width   7


die fenster größe und posietion darf wenn es Maxiemirt ist nicht mit gespeicht werden!
sonder muss befor es Maxiemirt wird gespeichert werden !
MSCH
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 1448
Erhaltene Danke: 3

W7 64
XE2, SQL, DevExpress, DevArt, Oracle, SQLServer
BeitragVerfasst: So 24.08.03 17:46 
es gibt ne Message WM_SysCommand mit wParam=sc_minimize und sc_maximize sowie sc_restore.

on Resize() funktioniert da nicht.

grez
msch

_________________
ist das politisch, wenn ich linksdrehenden Joghurt haben möchte?
Killmag10 Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 297

Suse Linux / DOS / Windows All In One ;)
D4 / D2005
BeitragVerfasst: So 24.08.03 17:53 
MSCH hat folgendes geschrieben:
es gibt ne Message WM_SysCommand mit wParam=sc_minimize und sc_maximize sowie sc_restore.

on Resize() funktioniert da nicht.

grez
msch


he? wirrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr !

ihrgendwie hab ich jetzt blos bahnhof verstanden ! :?:

also was muss ich jetzt machen ? bitte nochmal ausführlicher !
AndyB
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 1173
Erhaltene Danke: 14


RAD Studio XE2
BeitragVerfasst: So 24.08.03 18:14 
Wenn es nur um das Hauptformular geht, kannst du es mit Application.OnMaximize und Application.OnRestore abfangen.

_________________
Ist Zeit wirklich Geld?
toms
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 1099
Erhaltene Danke: 2



BeitragVerfasst: So 24.08.03 18:22 
Sonst musst du einen Handler für WM_SYSCOMMAND deklarieren
und überprüfen, ob der CmdType SC_MAXIMIZE ist.

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:
  private
    { Private declarations }
    procedure WMSyscommand(var msg: TWmSysCommand); message WM_SYSCOMMAND;
    procedure WMSize( Var msg: TWMSize ); Message WM_SIZE;

  public
    { Public declarations }
  end;

var
  Form1: TForm1;

implementation

{$R *.dfm}

procedure TForm1.WMSyscommand(var msg: TWmSysCommand);
begin
   case (msg.CmdType and $FFF0) of
     SC_MAXIMIZE: 
                  begin
                    ShowMessage('Fenster wird MAXIMIERT');
                  end;
   end;
   inherited;
end;

procedure TForm1.WMSize(var msg: TWMSize);
begin
  If msg.Sizetype = SIZE_MAXIMIZED then
    ShowMessage('Fenster wurde MAXIMIERT');
  inherited;
end;
Killmag10 Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 297

Suse Linux / DOS / Windows All In One ;)
D4 / D2005
BeitragVerfasst: So 24.08.03 18:47 
ausblenden Delphi-Quelltext
1:
2:
3:
4:
private
    { Private declarations }
    procedure WMSyscommand(var msg: TWmSysCommand); message WM_SYSCOMMAND;
    procedure WMSize( Var msg: TWMSize ); Message WM_SIZE;


aber das gehört doch unter type !

drotzdem DANKE ! :D
toms
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 1099
Erhaltene Danke: 2



BeitragVerfasst: So 24.08.03 19:04 
Zitat:
aber das gehört doch unter type !


War ja auch nur ein Code-Ausschnitt. Klar gehört das unter Type.
Killmag10 Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 297

Suse Linux / DOS / Windows All In One ;)
D4 / D2005
BeitragVerfasst: So 24.08.03 19:18 
wie hast du eigendlich das zusammen gebaut ?

ausblenden Delphi-Quelltext
1:
procedure WMSyscommand(var msg: TWmSysCommand); message WM_SYSCOMMAND;					


ich mein proceduren deklarieren kein problem !
aber wie geht das das mann zuweisen kann wann sie ausgelöst werden ?
(also wie in diesen fall !)
toms
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 1099
Erhaltene Danke: 2



BeitragVerfasst: So 24.08.03 19:42 
Zitat:
aber wie geht das das mann zuweisen kann wann sie ausgelöst werden ?


Wie meinst du das mit zuweisen, und was soll was zugewiesen werden?
Killmag10 Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 297

Suse Linux / DOS / Windows All In One ;)
D4 / D2005
BeitragVerfasst: So 24.08.03 19:48 
also wie du das

ausblenden Delphi-Quelltext
1:
procedure WMSyscommand(var msg: TWmSysCommand); message WM_SYSCOMMAND;					


zusamen gebaut hast ?

also wie kann ich selber so etwas zusammen bauen kann ?

also woher du weist was bei der Parameterliste reingeschrieben werden muss und so?
toms
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 1099
Erhaltene Danke: 2



BeitragVerfasst: So 24.08.03 20:30 
Eigentlich immer nach dem gleichen Schema.
Bsp. Man möchte z.B einen Handler für WM_MOVE deklarieren.


procedure WMMove(var msg: TWmMove); message WM_MOVE;

Das rotfarbige ist bei all diesen Handlern identisch.
Der Parameter ist jeweils nach dem Schema

var msg: TWMMOVE (ohne _ )
Killmag10 Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 297

Suse Linux / DOS / Windows All In One ;)
D4 / D2005
BeitragVerfasst: So 24.08.03 20:37 
toms hat folgendes geschrieben:
Eigentlich immer nach dem gleichen Schema.
Bsp. Man möchte z.B einen Handler für WM_MOVE deklarieren.


procedure WMMove(var msg: TWmMove); message WM_MOVE;

Das rotfarbige ist bei all diesen Handlern identisch.
Der Parameter ist jeweils nach dem Schema

var msg: TWMMOVE (ohne _ )


gut jetzt hab ich das geraft !

aber woher weist du was zb WM_MOVE bedeutet ?
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 25.08.03 14:18 
Killmag10 hat folgendes geschrieben:
aber woher weist du was zb WM_MOVE bedeutet ?

Zum Beispiel hier von: msdn.microsoft.com/l...messages/wm_move.asp

Gruß
Tino
Killmag10 Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 297

Suse Linux / DOS / Windows All In One ;)
D4 / D2005
BeitragVerfasst: Mo 25.08.03 16:43 
Danke nochmal für alles !