Autor Beitrag
Smilebey
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 59

Win XP
D7 Ent
BeitragVerfasst: Do 16.02.06 20:54 
Wann weiß ich dass die Applikation minimiert ist?
Fabian W.
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 1766

Win 7
D7 PE
BeitragVerfasst: Do 16.02.06 20:59 
Wie meinst du das? Mit ne Prog herrausfinden, einfach als User oder wie?
Evtl könntest du auch ein änliches Prob habe wie ich: www.delphi-forum.de/viewtopic.php?t=55811
Smilebey Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 59

Win XP
D7 Ent
BeitragVerfasst: Do 16.02.06 21:02 
Naja eigentlich möchte ich wissen wann meine app minimiert wird dass ich dann eine Funktion in den Lauf setze
JRegier
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 1268

Win XP Home, Prof, 2003 Server
D6 Enterprise
BeitragVerfasst: Do 16.02.06 21:05 
user profile iconSmilebey hat folgendes geschrieben:
Naja eigentlich möchte ich wissen wann meine app minimiert wird dass ich dann eine Funktion in den Lauf setze


Dann mußt du die WinProc einsetzen und WM_MINIMIZE abfangen. Siehe Win API/SDK Hilfe.
Fabian W.
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 1766

Win 7
D7 PE
BeitragVerfasst: Do 16.02.06 21:08 
if Form1.windowstate = wsminimized then
//befehl
Smilebey Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 59

Win XP
D7 Ent
BeitragVerfasst: Do 16.02.06 21:08 
user profile iconJRegier hat folgendes geschrieben:
user profile iconSmilebey hat folgendes geschrieben:
Naja eigentlich möchte ich wissen wann meine app minimiert wird dass ich dann eine Funktion in den Lauf setze


Dann mußt du die WinProc einsetzen und WM_MINIMIZE abfangen. Siehe Win API/SDK Hilfe.


Ok aber kann jemand das näher bringen?
Smilebey Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 59

Win XP
D7 Ent
BeitragVerfasst: Do 16.02.06 21:19 
Also dann müsste ich einen Timer mit diesem if-Befehl verwenden um immer zu wissen wann die Form mimimiert ist. Lastet das dann nicht zu viel den CPU? Wenn ja gibt es einen anderen Weg z.B. eine Funktion wie OnClose aber natürlich für Minimize
JRegier
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 1268

Win XP Home, Prof, 2003 Server
D6 Enterprise
BeitragVerfasst: Do 16.02.06 21:58 
Ah, habe mich getäuscht. Machst du:
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
type
  TForm1 = class(TForm)
  ...
  private
  procedure OnAppMinimize(Sender : TObject);
  end;

TForm1.FormCreate(Sender : TObject);
begin
   // Initialisierungen
   Application.OnMinimize := OnAppMinimize;
end;

TForm1.OnAppMinimize(Sender : TObject);
begin
  Application.MessageBox('Minimiert');
end;


Oder so: www.delphi-forum.de/...highlight=onminimize
Oder das: www.delphi-forum.de/...highlight=onminimize