Autor Beitrag
whitef
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 202
Erhaltene Danke: 1

Windows X
Delphi XE X
BeitragVerfasst: Do 08.02.07 18:36 
Hi, ich denke mal meine Überschrift sagt schon alles aus... ;)

Also ich möchte gerne erst ein Tray-Symbol anzeigen lassen wenn man das Fenster (Form) auch wirklich erst minimiert.
Und das Tray-Symbol sollte wieder verschwinden wenn das Fenster (Form) wiederhergestellt wird.

schonmal danke für die antworten ;)

grEEtz whiteF
DarkLord05
ontopic starontopic starontopic starontopic starontopic starofftopic starofftopic starofftopic star
Beiträge: 449

WinXP Pro SP2
Opera; Delphi 3 Pro; Delphi 2005, Turbo Delphi, dev-c++, Eclipse, MS Visual Studio .NET 2003, MS Visual C++
BeitragVerfasst: Do 08.02.07 18:40 
Gibts eine Option im Object Manager. Frag mich aber nicht wie die heißt, hab das gerade nicht hier.

_________________
QBasic | Delphi | c++ | PHP | C# .NET | Java
whitef Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 202
Erhaltene Danke: 1

Windows X
Delphi XE X
BeitragVerfasst: Do 08.02.07 19:04 
mh... frage ist immer noch offen, also jungs fleißig antworten posten... ;)
JayEff
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 2971

Windows Vista Ultimate
D7 Enterprise
BeitragVerfasst: Do 08.02.07 19:43 
CoolTrayIcon hat ein Ereignis: OnMinimizeToTray. Darin kannst du ja IconVisible:=true setzen. im Form.onPaint könntest du IconVisible wieder auf false setzen, aber paint wird viel öfter aufgerufen als es für deinen Zweck nötig ist, vielleicht gibts eine bessere lösung..
Ich vermute, MinimizeToTray hast du bereits auf true.

_________________
>+++[>+++[>++++++++<-]<-]<++++[>++++[>>>+++++++<<<-]<-]<<++
[>++[>++[>>++++<<-]<-]<-]>>>>>++++++++++++++++++.+++++++.>++.-.<<.>>--.<+++++..<+.
Jakob Schöttl
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 929
Erhaltene Danke: 1


Delphi 7 Professional
BeitragVerfasst: Do 08.02.07 19:44 
TCoolTrayIcon hat doch die eigenschaft Visible oder so?
Bergmann89
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 1742
Erhaltene Danke: 72

Win7 x64, Ubuntu 11.10
Delphi 7 Personal, Lazarus/FPC 2.2.4, C, C++, C# (Visual Studio 2010), PHP, Java (Netbeans, Eclipse)
BeitragVerfasst: Do 08.02.07 19:51 
@JayEff: du musst ja nciht ma OnMini... nehmen, denn er
ruft ja sowieso irgendwo den Befehl auf das die Form
schließt also kann er da gleich Tray.Visible:=True drunter
setzten. Und wenn er den befehl zum Form anzeigen nimmt sezt
er Visible False.
und schon hat sich die sache erledigt ^^

MfG Bergmann.
JayEff
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 2971

Windows Vista Ultimate
D7 Enterprise
BeitragVerfasst: Do 08.02.07 19:54 
Naja, dann ist aber nicht die Möglichkeit abgedeckt, dass der user auf den minimieren button in der oberen Leiste klickt.

_________________
>+++[>+++[>++++++++<-]<-]<++++[>++++[>>>+++++++<<<-]<-]<<++
[>++[>++[>>++++<<-]<-]<-]>>>>>++++++++++++++++++.+++++++.>++.-.<<.>>--.<+++++..<+.
whitef Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 202
Erhaltene Danke: 1

Windows X
Delphi XE X
BeitragVerfasst: Do 08.02.07 19:56 
ich rast gleich aus, da klappt wirklich gar nichts..... argh
Bergmann89
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 1742
Erhaltene Danke: 72

Win7 x64, Ubuntu 11.10
Delphi 7 Personal, Lazarus/FPC 2.2.4, C, C++, C# (Visual Studio 2010), PHP, Java (Netbeans, Eclipse)
BeitragVerfasst: Do 08.02.07 19:57 
Achso, sorry. Ich dachte er will die Form ganz verschwinden lassen.
Dann hast du natürlich recht ... :D
Blackheart666
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 2195

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

var
  Form1: TForm1;

implementation

{$R *.dfm}

procedure TForm1.WMSysCommand;
begin
  if (Msg.CmdType = SC_MINIMIZE) then CoolTrayIcon1.IconVisible:=True
  else CoolTrayIcon1.IconVisible:=False;
  DefaultHandler(Msg);
end;

end.
whitef Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 202
Erhaltene Danke: 1

Windows X
Delphi XE X
BeitragVerfasst: Do 08.02.07 20:05 
also:
bei programmstart = kein tray
beim minimieren = tray soll erscheinen
beim doppelklick auf tray = tray soll verschwinden
whitef Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 202
Erhaltene Danke: 1

Windows X
Delphi XE X
BeitragVerfasst: Do 08.02.07 20:09 
danke für den source... aber damit klappt leider auch nix.
er minimiert des stink normal in die programm leiste, aber erst nach 15 klicks verschdinet des dann irgendwann in tray...

ich hab bis jetzt eigentlich nur des:

ausblenden Delphi-Quelltext
1:
2:
3:
4:
procedure TForm1.CoolTrayIconOnDblClick(Sender: TObject);
begin
Application.Restore
end;
JayEff
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 2971

Windows Vista Ultimate
D7 Enterprise
BeitragVerfasst: Do 08.02.07 20:09 
Blackhearts code sollte genau das sein, was du suchst.

edit: Bei mir klappt der Code perfekt... Mal abgesehen davon, dass das fenster nicht richtig minimiert wird, sondern als kleines fensterchen unten links abgelegt wird :shock:

_________________
>+++[>+++[>++++++++<-]<-]<++++[>++++[>>>+++++++<<<-]<-]<<++
[>++[>++[>>++++<<-]<-]<-]>>>>>++++++++++++++++++.+++++++.>++.-.<<.>>--.<+++++..<+.
Regan
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 2157
Erhaltene Danke: 72


Java (Eclipse), Python (Sublimetext 3)
BeitragVerfasst: Do 08.02.07 20:16 
ich würde es so versuchen: Du musst dir dazu aber ein ApplicationEvents Kompo auf die Form ziehen.
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
procedure TForm1.FormCreate(Sender: TObject);
begin
CoolTrayIcon1.IconVisible:=false;
CoolTrayIcon1.MinimizeToTray:=true;
end;
{...}
procedure TForm1.CoolTrayIcon1DblClick(Sender: TObject);
begin
Application.Restore;
Application.BringToFront;
CoolTrayIcon1.IconVisible:=false;
end;
{...}
procedure TForm1.ApplicationEvents1Minimize(Sender: TObject);
begin
CoolTrayIcon1.IconVisible:=true;
end;
whitef Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 202
Erhaltene Danke: 1

Windows X
Delphi XE X
BeitragVerfasst: Do 08.02.07 20:21 
ok BIG THANKS an alle!!!


mit Regons Antwort konnte ich das prob lösen!!!


:CLOSED: ;) nach viel zigaretten und schweiß