Autor Beitrag
SAiBOT
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 323
Erhaltene Danke: 5

XP SP2; 7
D7; D2009
BeitragVerfasst: Mo 14.12.09 10:05 
Ich kriege es einfach nicht hin, ein Icon für die Tool Palette meiner Komponente zu erstellen :cry:

Meine .dpk-Datei sieht wie folgt aus:
ausblenden volle Höhe Delphi-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:
28:
29:
30:
31:
32:
33:
34:
package EsUtils;

{$R *.res}
{$ALIGN 8}
{$ASSERTIONS ON}
{$BOOLEVAL OFF}
{$DEBUGINFO ON}
{$EXTENDEDSYNTAX ON}
{$IMPORTEDDATA ON}
{$IOCHECKS ON}
{$LOCALSYMBOLS ON}
{$LONGSTRINGS ON}
{$OPENSTRINGS ON}
{$OPTIMIZATION ON}
{$OVERFLOWCHECKS OFF}
{$RANGECHECKS OFF}
{$REFERENCEINFO OFF}
{$SAFEDIVIDE OFF}
{$STACKFRAMES OFF}
{$TYPEDADDRESS OFF}
{$VARSTRINGCHECKS ON}
{$WRITEABLECONST OFF}
{$MINENUMSIZE 1}
{$IMAGEBASE $400000}
{$IMPLICITBUILD ON}

requires
  rtl,
  vcl;

contains
  EsFFMPEG in 'EsFFMPEG.pas';

end.


die Unit so:
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
unit EsFFMPEG;

//...

procedure Register;

implementation
{$R EsFFMPEG.dcr}

//...

procedure Register;
begin
  RegisterComponents('EsUtils', [TEsFFMPEG]);
end;

end.


Und meine dcr so:
user defined image

Natürlich liegen die dpk, pas, und dcr-Datei alle im selben Verzeichnis.
Nach der Installation der .dpk-Datei, hat meine Komponente leider immernoch das standart Icon :nixweiss:
Woran liegt das?

_________________
Debuggers don't remove bugs, they only show them in slow-motion.
ffgorcky
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 573

WIN XP/2000 & 7Prof (Familie:Win95,Win98)

BeitragVerfasst: Mo 14.12.09 15:07 
Entschuldigung, wahrscheinlich geht das nur mir so, aber ich verstehe noch nicht so ganz Dein genaues Problem...
Also kannst Du nur Deiner Anwendung kein Icon zuweisen? - Das müsstest Du doch eigentlich über Projekt -> Optionen einstellen können.
Oder möchtest Du nur zur Laufzeit Deinem Programm ein anderes Symbol zuweisen? - Das geht dann mit
ausblenden Delphi-Quelltext
1:
Application.Icon.LoadFromFile(NameDerGewuenschtenDatei);					
SAiBOT Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 323
Erhaltene Danke: 5

XP SP2; 7
D7; D2009
BeitragVerfasst: Mo 14.12.09 16:21 
Nicht Anwendung, sondern Komponente.
Es geht um die kleinen Bilder, die in der "Tool Palette" zu sehen sind.
Aber trotzdem danke :wink:

_________________
Debuggers don't remove bugs, they only show them in slow-motion.
Martok
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 3661
Erhaltene Danke: 604

Win 8.1, Win 10 x64
Pascal: Lazarus Snapshot, Delphi 7,2007; PHP, JS: WebStorm
BeitragVerfasst: Mo 14.12.09 22:42 
IIRC müsste doch das $R-Statement für die DCR in die DPK, oder?

Bin mir grad nicht sicher... hab nur grad mal in ein anderes Package reingeguckt.

Ändert das was?
Normalerweise müsste der Package Explorer dann auch die .dcr anzeigen.

_________________
"The phoenix's price isn't inevitable. It's not part of some deep balance built into the universe. It's just the parts of the game where you haven't figured out yet how to cheat."
ffgorcky
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 573

WIN XP/2000 & 7Prof (Familie:Win95,Win98)

BeitragVerfasst: Di 15.12.09 15:11 
Also Du hast eine eigene Komponente gebaut und möchtest Ihr ein Icon zuweisen, damit Du sie in der Toolpalette und in Deinem Programmentwicklungsfenster besser identifizieren kannst?
Das klingt mir sehr nach diesem Thema: Icons für eigene Komponenten

- Oder verstehe ich Dich jetzt immer noch falsch?
SAiBOT Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 323
Erhaltene Danke: 5

XP SP2; 7
D7; D2009
BeitragVerfasst: Di 15.12.09 15:52 
user profile iconMartok hat folgendes geschrieben Zum zitierten Posting springen:
IIRC müsste doch das $R-Statement für die DCR in die DPK, oder?

Bin mir grad nicht sicher... hab nur grad mal in ein anderes Package reingeguckt.

Ändert das was?
Normalerweise müsste der Package Explorer dann auch die .dcr anzeigen.


Ging auch nicht :nixweiss:, aber ich habe es jetzt gelöst:
Ich habe die Komponente Deinstalliert (wie vorher auch schon hunderte male), die IDE beendet, die dcu-Dateien per Hand gelöscht (obwohl es ein klick auf "build" doch eigendlich auch tun müsste :nixweiss:), IDE gestartet und Komponente Installiert.
Siehe da es funktioniert.

user profile iconffgorcky hat folgendes geschrieben Zum zitierten Posting springen:
Also Du hast eine eigene Komponente gebaut und möchtest Ihr ein Icon zuweisen, damit Du sie in der Toolpalette und in Deinem Programmentwicklungsfenster besser identifizieren kannst?
Das klingt mir sehr nach diesem Thema: Icons für eigene Komponenten

- Oder verstehe ich Dich jetzt immer noch falsch?


Jetzt verstehst du mich richtig, aber an diese Tips und Tutorials habe ich mich ja strickt gehalten.

_________________
Debuggers don't remove bugs, they only show them in slow-motion.