Autor Beitrag
Jan K.
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 36

Win XP
D6
BeitragVerfasst: Fr 09.05.03 14:02 
Hi, ich möchte, das mein Programm, wenn es minimiert wird nicht mehr in der Taskleiste angezeigt wird.
Ich wollte das mit Form1.visible:=false machen, doch ich weiß nicht, wie ich es schaffe, dass das nur gemacht wird, wenn das Programm minimiert wird (....onminimze) oder so.
Danke für eure Hilfe!!!
Moritz M.
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 1672



BeitragVerfasst: Fr 09.05.03 14:21 
Schau dir mal die Komponente TCoolTrayIcon an, die macht das automatisch.
Ansonsten geht das mit Application.OnMinimize.
Luckie
Ehemaliges Mitglied
Erhaltene Danke: 1



BeitragVerfasst: Fr 09.05.03 15:14 
Wenn du beim Minimieren, dein Fenster unsichtbar machst und nicht in der Taskleiste ablegst, wie soll man es dann wiederherstellen können?

ausblenden 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:
type 
  TForm1 = class(TForm) 
  private 
    { Private-Deklarationen } 
  public 
    { Public-Deklarationen } 
    procedure WMSYSACOMMAND(var msg: TMessage); message WM_SYSCOMMAND; 
  end; 

var 
  Form1: TForm1; 

implementation 

{$R *.dfm} 

procedure TForm1.WMSYSACOMMAND(var msg: Tmessage); 
begin 
  if msg.Msg = WM_SYSCOMMAND then 
  begin 
    case msg.WParam of 
      SC_MAXIMIZE : ShowMessage('Juhu, ich werde maximiert.'); 
      SC_MINIMIZE : ShowMessage('Hilfe, ich werde minimiert.'); 
    end; 
  end; 
  inherited; 
end;
Jan K. Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 36

Win XP
D6
BeitragVerfasst: Sa 10.05.03 09:02 
Hi, das Programm erzeugt ein TrayIcon mit dem man es wieder maximieren kann.
Danke für die Antworten
Jan K. Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 36

Win XP
D6
BeitragVerfasst: Sa 10.05.03 10:18 
@Luckie: Danke, der Code funktioniert

Doch wenn ich Form1.visible:=false;
eingebe, ist das Fenster zwar nicht mehr zu sehen, es wird aber immernoch in der Taskleiste angezeigt :nixweiss:

@Onz: Die TCoolTrayIcon Komponente hab ich nicht[/quote]
Luckie
Ehemaliges Mitglied
Erhaltene Danke: 1



BeitragVerfasst: Sa 10.05.03 15:06 
ausblenden Quelltext
1:
2:
3:
4:
procedure TForm1.Button1Click(Sender: TObject);
begin
  showWindow(application.handle,sw_hide);
end;
Moritz M.
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 1672



BeitragVerfasst: Sa 10.05.03 17:21 
Der Code stimmt auch, ich würde an deiner Stelle aber auch mal die Komponente ausprobieren:
downloads.delphi32.c...26/5086/cooltray.zip