Autor Beitrag
5M17H
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 164

XP, Vista32, bald auch Vista64
PHP(3/5), Delphi(2), Java(1), C(3), C#(1)
BeitragVerfasst: Mo 25.06.07 09:57 
Ich hoffe Ihr seid mir nicht böse wenn das Thread irgendwie falsch ist, hat aber denke ich schon was mit Multimedia und Grafik zu tun.

Also. Ich schreibe gerade meine Delphi Abschlussklausur in Delphi. Ein Grundbaustein für einen Terminkalender, also 'Eingegebenes Datum + X-Tage' oder '- X-Tage' oder Differenz errechnen und sowas.

[url]www.oliver.lippert.it[/url] da könnt Ihr dann Bald lesen wie das Aussah. Noch gibt es da aber nichts.

Nagut backtotopic.
Ich will ein "Minimize to Tray" einbauen. Das stichwort 'CoolTrayIcon' kenne ich aber ich habe probleme es zu 'installieren' mir fehlt vcl50 oder so. Kann mir da wer helfen, ob das einfacher geht oder ob das nur mit 'CoolTrayIcon' geht.


Moderiert von user profile iconChristian S.: Topic aus Multimedia / Grafik verschoben am Mo 25.06.2007 um 12:12
mkinzler
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 4106
Erhaltene Danke: 13


Delphi 2010 Pro; Delphi.Prism 2011 pro
BeitragVerfasst: Mo 25.06.07 10:33 
Nimm die Referenz auf vcl50 aus dem package raus. delphi ersetzt sie dann mit der richtigen (VCL100)

_________________
Markus Kinzler.
5M17H Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 164

XP, Vista32, bald auch Vista64
PHP(3/5), Delphi(2), Java(1), C(3), C#(1)
BeitragVerfasst: Mo 25.06.07 10:45 
"Ohne angaben einer Host-Anwendung kann das Projekt nicht ausgeführt werden. Verwenden Sie das Dialogfeld Start|Parameter..."

???
mkinzler
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 4106
Erhaltene Danke: 13


Delphi 2010 Pro; Delphi.Prism 2011 pro
BeitragVerfasst: Mo 25.06.07 10:56 
Du kannst eine Bpl auch nicht Ausführen.

_________________
Markus Kinzler.
Christian S.
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 20451
Erhaltene Danke: 2264

Win 10
C# (VS 2019)
BeitragVerfasst: Mo 25.06.07 11:13 
Falls Du Turbo Delphi Explorer hast, dann kannst Du keine Fremdkomponenten installieren. Du wirst CoolTrayIcon also enteder im Code erzeugen und einbinden müssen, oder Du schaust mal in unsere Delphi-Library, da sollte es auch einen Beitrag zum TrayIcon geben

_________________
Zwei Worte werden Dir im Leben viele Türen öffnen - "ziehen" und "drücken".
5M17H Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 164

XP, Vista32, bald auch Vista64
PHP(3/5), Delphi(2), Java(1), C(3), C#(1)
BeitragVerfasst: Mo 25.06.07 11:42 
Also ich habe das jetzt irgendwie hinbekommen -VCL dingens hinzufügen oder so- danke euch...

[edit] das war irgendwie ein TrayIcon geht das damit auch?
[edit2] das sieht schon nett aus. klappt auch schon nur noch 1 sachen: Wenn man in der Statusleiste oben auf minimieren klickt das er dann auch ins tray minimiert..?
matze
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 4613
Erhaltene Danke: 24

XP home, prof
Delphi 2009 Prof,
BeitragVerfasst: Mo 25.06.07 14:46 
Turbo Delphi hat schon eine Komponente für Tray Icons mit an Bord.

_________________
In the beginning was the word.
And the word was content-type: text/plain.
5M17H Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 164

XP, Vista32, bald auch Vista64
PHP(3/5), Delphi(2), Java(1), C(3), C#(1)
BeitragVerfasst: Mo 25.06.07 14:57 
Das hatte ich ja geschrieben

-VCL dingens hinzufügen oder so-

aber ich will halt wissen wie ich das hinbekomme das man quasi den -2ten buttno rechts von dem roten X für scließen also den- minimieren button klickt, er auch ins tray verschwindet... wie heißt die Procedure oder was auch immer
jakobwenzel
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 1889
Erhaltene Danke: 1

XP home, ubuntu
BDS 2006 Prof
BeitragVerfasst: Mo 25.06.07 15:01 
Dazu gibts das Event OnMinimize.

_________________
I thought what I'd do was, I'd pretend I was one of those deaf-mutes.
5M17H Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 164

XP, Vista32, bald auch Vista64
PHP(3/5), Delphi(2), Java(1), C(3), C#(1)
BeitragVerfasst: Mo 25.06.07 15:04 
Das habe ich mir gedacht schon verzweifelt nach der funktionsweise gesucht!?
Wie geht das? Wie benutze ich das?

Danke schonmal für alle Antworten die waren und noch -hoffentlich- kommen
jakobwenzel
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 1889
Erhaltene Danke: 1

XP home, ubuntu
BDS 2006 Prof
BeitragVerfasst: Mo 25.06.07 15:10 
Das, was bei onMinimize steht, wird beim minimieren ausgeführt. Da muss dannd er Code rein, um den Taskleisteneintrag zu verstecken und das Trayicon zu erzeugen.

_________________
I thought what I'd do was, I'd pretend I was one of those deaf-mutes.
5M17H Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 164

XP, Vista32, bald auch Vista64
PHP(3/5), Delphi(2), Java(1), C(3), C#(1)
BeitragVerfasst: Mo 25.06.07 15:13 
Ja das is schon klar...
Nur, wo finde ich 'OnMinimize'?
Es gibt im Form kein Ereigniss was OnMinimize heißt.
jakobwenzel
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 1889
Erhaltene Danke: 1

XP home, ubuntu
BDS 2006 Prof
BeitragVerfasst: Mo 25.06.07 15:17 
Das is ein Event von der ganzen Anwendung, an die du am leichtesten mit der komponente ApplicationEvents rnkommst.

_________________
I thought what I'd do was, I'd pretend I was one of those deaf-mutes.
5M17H Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 164

XP, Vista32, bald auch Vista64
PHP(3/5), Delphi(2), Java(1), C(3), C#(1)
BeitragVerfasst: Mo 25.06.07 15:24 
Jetz weiß ich mehr. Nämlich das ich keine ahnung habe...
Zitat:
mit der komponente ApplicationEvents

??? Entschuldigung aber ich komme nicht mit... ApplicationEvents. Was ist das?
jakobwenzel
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 1889
Erhaltene Danke: 1

XP home, ubuntu
BDS 2006 Prof
BeitragVerfasst: Mo 25.06.07 15:35 
Eine Komponente, die man aufs Formular setzen kann. Die hat zwar keine Eigenschaften,. außer den standardmäßigen, aber umso mehr Ereignisse.
Die beziehen sich auf die gesamte Anwendung.

_________________
I thought what I'd do was, I'd pretend I was one of those deaf-mutes.
5M17H Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 164

XP, Vista32, bald auch Vista64
PHP(3/5), Delphi(2), Java(1), C(3), C#(1)
BeitragVerfasst: Mo 25.06.07 15:46 
Jo Danke jetzt Funktionierts
DANKE DANKE DANKE
5M17H Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 164

XP, Vista32, bald auch Vista64
PHP(3/5), Delphi(2), Java(1), C(3), C#(1)
BeitragVerfasst: Mo 25.06.07 15:49 
Leider funktioniert das während der PRogrammlaufzeit nur einmal !?
Regan
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 2157
Erhaltene Danke: 72


Java (Eclipse), Python (Sublimetext 3)
BeitragVerfasst: Di 26.06.07 06:51 
Dann zeig doch mal deinen Code her. Vor allem der, mit dem du das Fenster wiederherstelltst.
5M17H Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 164

XP, Vista32, bald auch Vista64
PHP(3/5), Delphi(2), Java(1), C(3), C#(1)
BeitragVerfasst: Di 26.06.07 11:29 
Ok hier

ausblenden Bei klick auf Minimieren
1:
2:
3:
4:
5:
6:
7:
8:
9:
procedure TForm1.ApplicationEvents1Minimize(Sender: TObject);
begin
  TrayIcon1.Visible := true;
  Application.Minimize;
  Form1.Visible := false;
  TrayIcon1.Hint := Form1.Caption + ' wurde Minimiert.';
  TrayIcon1.BalloonHint := Form1.Caption + ' ist noch Aktiv. Doppelklick zum Öffnen';
  TrayIcon1.ShowBalloonHint;
end;


ausblenden Beim wiederaufbau
1:
2:
3:
4:
5:
6:
7:
procedure TForm1.TrayIcon1DblClick(Sender: TObject);
begin
  TrayIcon1.Visible := false;
  Form1.Visible := true;
  Form1.FormStyle := fsStayonTop;
  Form1.FormStyle := fsNormal;
end;


ausblenden Bei einmaligem klick
1:
2:
3:
4:
5:
procedure TForm1.TrayIcon1Click(Sender: TObject);
begin
  TrayIcon1.BalloonHint := Form1.Caption + ' ist noch Aktiv. Doppelklick zum Öffnen';
  TrayIcon1.ShowBalloonHint;
end;
Regan
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 2157
Erhaltene Danke: 72


Java (Eclipse), Python (Sublimetext 3)
BeitragVerfasst: Di 26.06.07 13:46 
user profile icon5M17H hat folgendes geschrieben:

ausblenden Bei klick auf Minimieren
1:
2:
3:
4:
5:
6:
7:
8:
9:
procedure TForm1.ApplicationEvents1Minimize(Sender: TObject);
begin
  TrayIcon1.Visible := true;
  Application.Minimize;
  //Form1.Visible := false; brauchste du nicht, da die anwendung nicht sichtbar ist.
  TrayIcon1.Hint := Form1.Caption + ' wurde Minimiert.';
  TrayIcon1.BalloonHint := Form1.Caption + ' ist noch Aktiv. Doppelklick zum Öffnen';
  TrayIcon1.ShowBalloonHint;
end;


ausblenden Beim wiederaufbau
1:
2:
3:
4:
5:
6:
7:
8:
procedure TForm1.TrayIcon1DblClick(Sender: TObject);
begin
  TrayIcon1.Visible := false;
  //Form1.Visible := true; nicht nötig da du sie nicht ausblendest 
  Applicaiton.Restore; //zum wiederherstellen. erst dann wird das programm als wieder da interpretiert.
  Form1.FormStyle := fsStayonTop; //warum doppelt?
  Form1.FormStyle := fsNormal;
end;


ausblenden Bei einmaligem klick
1:
2:
3:
4:
5:
procedure TForm1.TrayIcon1Click(Sender: TObject);
begin
  TrayIcon1.BalloonHint := Form1.Caption + ' ist noch Aktiv. Doppelklick zum Öffnen';
  TrayIcon1.ShowBalloonHint;
end;

Dann söllte es eigentlich sein.


Zuletzt bearbeitet von Regan am Do 11.10.07 19:44, insgesamt 1-mal bearbeitet