Einzelnen Beitrag anzeigen

Delphi-Laie

Registriert seit: 25. Nov 2005
1.474 Beiträge
 
Delphi 10.1 Berlin Starter
 
#10

Re: Tutorial: Wie verwende ich das CoolTrayIcon?

  Alt 3. Apr 2008, 08:39
Hallo toms, vielen herzlichen Dank für Deine Antwort!

Nein, ich habe Punkt 3 in der Installationsanleitung nicht beachtet. Habe jetzt mal in meiner "Install.txt" nachgeschaut , dort steht (nur) folgendes
Zitat:
How to install the components
-----------------------------

*** YOU NEED TO INSTALL THE COMPONENTS BEFORE OPENING THE DEMOS IN DELPHI. ***


If you're running Delphi 5, 6, or 7:

1. Open CoolTrayIcon_D5.dpk (Delphi 5) or CoolTrayIcon_D6plus.dpk (Delphi 6
or above) either by doubleclicking the file or by selecting "Open Project"
inside Delphi. (CoolTrayIcon_D5.dpk may work for older Delphi versions
as well, but I don't know for sure. Please tell me if I'm right.)

2. Click Compile, then Install.

3. That's it. The components should be visible in the component palette
in a tab called "Tray Icons" (if older versions of the components were
already installed they may be found in "Custom").



If you're running other Delphi versions than ver. 5, 6, or 7:

1. Try the steps above with the CoolTrayIcon_D5.dpk file (it may work in
older versions of Delphi, but I don't know for sure. Please tell me).
If this doesn't work then do the following:

2. Select "Install Component" from the "Component" menu item (may vary
depending on your Delphi version).

3. A dialog displays where you must select the components to install and
the package to install into. I recommend creating a new package, if you
haven't already done so, rather than installing into the default package.

4. Browse for the RegisterTrayIcons.pas file and select OK.

5. That's it. The components should be visible in the component palette
in a tab called "Tray Icons" (if older versions of the components were
already installed they may be found in "Custom").



If you're running C++ Builder:

The required steps are the same as in Delphi, so just follow the steps above.

Alternatively, use this approach:

1. Select "New Component..." from the menu

2. In "Ancestor type", select "TTrayIcon [trayicon]"

3. In "Class Name", type "TCoolTrayIcon"

4. In "Palette Page", type "Tray Icons" (or another tab you want to install to)

5. In "Unit file name", select "RegisterTrayIcons.pas" (which is found in the
CoolTrayIcon package).

6. Click on the "Install" button.
Ich habe mir aber so etwas fast gedacht (ich kenne das noch von Turbo-Pascal). Ich habe dafür definitiv kein Verständnis, daß ich Installationspfade manuell nachtragen oder Dateien manuell in Verzeichnisse hinüberbewegen muß. Delphi habe ich in x Versionen, es wird soviel an diesem an sich hervorragenden Compiler rumgemacht, insofern verstehe ich nicht, daß man diesen Komfort dort mit einbauen kann. Das Problem hatte ich ja auch gelöst, das ist nicht der Schwerpunkt.

Zum minimierten Starten: Wie ich mit Cooltrayicon das erreiche, weiß ich leider immer noch nicht, dazu hattest Du Dich nicht geäußert. Die Anweisung Application.ShowMainForm := False; kenne ich durchaus, sie ist n.m.Erkenntnissen auch die einzige, mit der man minimiert starten kann. Hilft mir aber nicht weiter. Das Rumgemache am Projekt-Quelltext (warum wird der ab Delphi3 versteckt? führt leider ziemlich schnell zu Programmabstürzen (darum wohl das Verstecken) - dabei ist eine Projektdatei doch auch nur ein Programm mit eingelinkter Formularunit?! Ich möchte - als nächsten Schritt - diesen minimierten Programmstart bedingt, optional hinbekommen (nämlich dann, wenn ein Programm konfiguriert ist). Dazu müßte ich endlich mal herausfinden, wie man minimiert aufs TrayIcon startet.

Form1.visible:=false funktioniert bekanntermaßen ebensowenig wie Form1.hide, wenn es vom Ereignis Form1.Create aufgerufen wird (warum auch immer, ich weiß es bis heute nicht). Und ich frage mich, wie man das bei CoolTrayIcon und LMDIcon anders lösen will, aber das darf gern deren Geheimnis bleiben (Recherchen in den Quelltexten blieben erfolglos). Mir würde es schon reichen, wenn ich das hinbekäme.

Wenn Du oder jemand anders das weiß und mir helfen kann, bin ich sehr dankbar.

Vielen Dank für Deine Geduld und Mühe

Der leider extrem frustrierte

Delphi-Laie
  Mit Zitat antworten Zitat