Autor Beitrag
Apo95
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 129

Win2000, WinXP, WinServer 2003 Standard x86, Win7x64
Delphi 6 Enterprise, D2009 Architect, RAD Studio XE6 Architect
BeitragVerfasst: Mi 31.10.12 12:08 
Hallo, ich habe mit mühevoller Kleinarbeit einen Startbildschirm zurechtgekritzelt, aber ich hätte gerne, dass mit neinem Label die Schriftarten des OS eingelesen und angezeigt werden. Bsp: Lade Schriftarten: Arial.ttf... Ferner sollen installierte DLL-Dateien eingelesen, bzw. auf "Anwesenheit" überprüft werden.

Ich habe eine Prozedur im Quellcode des SplashFormulares erzeugt.:

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
procedure TForm11.ShowNextStep(nPercent: integer);
begin
     Gauge1.progress :=nPercent;
     Sleep(500);
end;
end.


Der Quellcode im Projekt sieht folgendermaßen 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:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:
51:
52:
53:
54:
55:
56:
57:
58:
59:
60:
61:
62:
63:
64:
65:
66:
67:
68:
69:
70:
71:
72:
73:
74:
75:
76:
77:
78:
79:
80:
81:
82:
83:
84:
85:
86:
87:
88:
89:
90:
91:
92:
93:
94:
95:
96:
97:
98:
99:
100:
101:
102:
103:
104:
105:
106:
107:
108:
109:
110:
111:
112:
113:
114:
115:
116:
117:
118:
119:
120:
121:
122:
123:
124:
125:
126:
127:
128:
129:
130:
131:
132:
133:
134:
135:
136:
137:
138:
139:
140:
141:
142:
143:
144:
145:
146:
147:
148:
149:
150:
151:
152:
153:
154:
155:
156:
157:
158:
159:
160:
161:
162:
163:
164:
165:
166:
167:
168:
169:
170:
171:
172:
173:
174:
175:
176:
177:
178:
179:
180:
181:
182:
183:
184:
185:
186:
187:
188:
189:
190:
191:
192:
193:
194:
195:
196:
197:
198:
199:
200:
201:
202:
203:
204:
205:
206:
207:
208:
209:
210:
211:
212:
213:
214:
215:
216:
217:
218:
219:
220:
221:
222:
223:
224:
225:
226:
227:
228:
229:
230:
231:
232:
233:
234:
235:
236:
237:
238:
239:
240:
241:
242:
243:
244:
245:
246:
247:
248:
249:
250:
251:
252:
program Apo;

uses
  Forms,
  Unit1 in 'Unit1.pas' {ApoPlus},
  Unit3 in 'Unit3.pas' {Artikelstamm},
  Unit4 in 'Unit4.pas' {Datensicherung},
  Unit5 in 'Unit5.pas' {FormProduktaktivierung},
  Unit6 in 'Unit6.pas' {Programminformation},
  Unit7 in 'Unit7.pas' {Taxe},
  Unit8 in 'Unit8.pas' {Form8},
  Unit9 in 'Unit9.pas' {Form9},
  Unit10 in 'Unit10.pas' {Form10},
  Unit11 in 'Unit11.pas' {Form11},
  Unit2 in 'Unit2.pas' {Bildschirmkasse},
  Unit12 in 'Unit12.pas' {Form12},
  Unit13 in 'Unit13.pas' {Form13},
  Unit14 in 'Unit14.pas' {Form14},
  Unit15 in 'Unit15.pas' {Form15},
  Unit16 in 'Unit16.pas' {Form16},
  Unit17 in 'Unit17.pas' {Form17},
  Unit18 in 'Unit18.pas' {Form18},
  Unit19 in 'Unit19.pas' {Form19},
  Unit20 in 'Unit20.pas' {Form20},
  Unit21 in 'Unit21.pas' {Form21},
  Unit22 in 'Unit22.pas' {Form22},
  Unit23 in 'Unit23.pas' {Form23},
  Unit24 in 'Unit24.pas' {Form24},
  Unit25 in 'Unit25.pas' {Form25},
  Unit26 in 'Unit26.pas' {Form26},
  Unit27 in 'Unit27.pas' {Form27},
  Unit29 in 'Unit29.pas' {Form29},
  Unit30 in 'Unit30.pas' {Form30},
  Unit31 in 'Unit31.pas' {Form31},
  Unit32 in 'Unit32.pas' {Form32},
  Unit33 in 'Unit33.pas' {Form33},
  Unit34 in 'Unit34.pas' {Form34};

{$R *.res}

var i,nModulanzahl : integer;

begin
  Application.Initialize;
  Form11 := TForm11.Create(Application);
  Form11.Show;
  i:= 1;
  nModulanzahl := 31;



  Application.MainFormOnTaskbar := True;

  Application.Title := 'ApoPlus 2010beta';

  Application.CreateForm(TApoPlus, ApoPlus);
    form11.LabelStatus.Caption := 'Initialisiere Hauptformular';
  form11.ShowNextStep(trunc (i*100/nModulanzahl));
  inc(i);
  Application.CreateForm(TForm34, Form34);
    form11.LabelStatus.Caption := 'Initialisiere Allgemeine Programmeinstellungen';
  form11.ShowNextStep(trunc (i*100/nModulanzahl));
  inc(i);

  Application.CreateForm(TForm33, Form33);
      form11.LabelStatus.Caption := 'Lade Inventurmanagement-System';
  form11.ShowNextStep(trunc (i*100/nModulanzahl));
  inc(i);

  Application.CreateForm(TForm32, Form32);
  form11.LabelStatus.Caption := 'Initialisiere Funktionen : Druckervorschau und -Auswahl';
  form11.ShowNextStep(trunc (i*100/nModulanzahl));

  inc(i);

  Application.CreateForm(TArtikelstamm, Artikelstamm);
  form11.LabelStatus.Caption := 'Lade Artikelstamm';
  form11.ShowNextStep(trunc (i*100/nModulanzahl));

  inc(i);

  Application.CreateForm(TDatensicherung, Datensicherung);
  form11.LabelStatus.Caption := 'Lade Datensicherung';
  form11.ShowNextStep(trunc (i*100/nModulanzahl));

  inc(i);

  Application.CreateForm(TFormProduktaktivierung, FormProduktaktivierung);
  form11.LabelStatus.Caption := 'Lade Produktaktivierung';
  form11.ShowNextStep(trunc (i*100/nModulanzahl));

  inc(i);


  Application.CreateForm(TProgramminformation, Programminformation);
  form11.LabelStatus.Caption := 'Lade Programminformation';
  form11.ShowNextStep(trunc (i*100/nModulanzahl));

  inc(i);

  Application.CreateForm(TTaxe, Taxe);
  form11.LabelStatus.Caption := 'Lade Taxe';
  form11.ShowNextStep(trunc (i*100/nModulanzahl));

  inc(i);

  Application.CreateForm(TForm8, Form8);
  form11.LabelStatus.Caption := 'Lade Kassierdialog';
  form11.ShowNextStep(trunc (i*100/nModulanzahl));

  inc(i);

  Application.CreateForm(TForm9, Form9);
  form11.LabelStatus.Caption := 'Lade Hardwareeinstellungen';
  form11.ShowNextStep(trunc (i*100/nModulanzahl));

  inc(i);

  Application.CreateForm(TForm10, Form10);
  form11.LabelStatus.Caption := 'Lade Kundenverwaltung';
  form11.ShowNextStep(trunc (i*100/nModulanzahl));

  inc(i);

  //Application.CreateForm(TForm11, Form11);
  //form11.ShowNextStep(trunc (i*100/nModulanzahl));
  //Form11.Refresh;
  //inc(i);

  Application.CreateForm(TBildschirmkasse, Bildschirmkasse);
  form11.LabelStatus.Caption := 'Lade Bildschirmkasse Aktiviere Treiber IO.dll ';
  form11.ShowNextStep(trunc (i*100/nModulanzahl));

  inc(i);

  Application.CreateForm(TForm12, Form12);
  form11.LabelStatus.Caption := 'Lade Tagesabschlussstammblatt';
  form11.ShowNextStep(trunc (i*100/nModulanzahl));

  inc(i);

  Application.CreateForm(TForm13, Form13);
  form11.LabelStatus.Caption := 'Lade Kassenbestand';
  form11.ShowNextStep(trunc (i*100/nModulanzahl));

  inc(i);

  Application.CreateForm(TForm14, Form14);
  form11.LabelStatus.Caption := 'Lade Statistik';
  form11.ShowNextStep(trunc (i*100/nModulanzahl));

  inc(i);

  Application.CreateForm(TForm15, Form15);
  form11.LabelStatus.Caption := 'Lade Lizenz/EULA';
  form11.ShowNextStep(trunc (i*100/nModulanzahl));

  inc(i);

  Application.CreateForm(TForm16, Form16);
  form11.LabelStatus.Caption := 'Lade chemisch- pharmazeutische Datenbank';
  form11.ShowNextStep(trunc (i*100/nModulanzahl));

  inc(i);

  Application.CreateForm(TForm17, Form17);
  form11.LabelStatus.Caption := 'Lade BtM-Wesen/BtM-Aktenverwaltung';
  form11.ShowNextStep(trunc (i*100/nModulanzahl));

  inc(i);

  Application.CreateForm(TForm18, Form18);
  form11.LabelStatus.Caption := 'Lade Bedienerstamm';
  form11.ShowNextStep(trunc (i*100/nModulanzahl));

  inc(i);

  Application.CreateForm(TForm19, Form19);
  form11.LabelStatus.Caption := 'Warengruppenverwaltung';
  form11.ShowNextStep(trunc (i*100/nModulanzahl));

  inc(i);

  Application.CreateForm(TForm20, Form20);
  form11.LabelStatus.Caption := 'Fehlerberichtsassistent';
  form11.ShowNextStep(trunc (i*100/nModulanzahl));

  inc(i);

  Application.CreateForm(TForm21, Form21);
  form11.LabelStatus.Caption := 'Lade Lieferantenstamm';
  form11.ShowNextStep(trunc (i*100/nModulanzahl));

  inc(i);

  Application.CreateForm(TForm22, Form22);
  form11.LabelStatus.Caption := 'Lade Wareneingang';
  form11.ShowNextStep(trunc (i*100/nModulanzahl));

  inc(i);

  Application.CreateForm(TForm23, Form23);
  form11.LabelStatus.Caption := 'Lade Bestellassistenten';
  form11.ShowNextStep(trunc (i*100/nModulanzahl));

  inc(i);

  Application.CreateForm(TForm24, Form24);
  form11.LabelStatus.Caption := 'Lade Passwortänderung';
  form11.ShowNextStep(trunc (i*100/nModulanzahl));

  inc(i);

  Application.CreateForm(TForm25, Form25);
  form11.LabelStatus.Caption := 'Lade Rezeptgebühr';
  form11.ShowNextStep(trunc (i*100/nModulanzahl));

  inc(i);

  Application.CreateForm(TForm26, Form26);
  form11.LabelStatus.Caption := 'Lade Sonderartikeleingabe';
  form11.ShowNextStep(trunc (i*100/nModulanzahl));

  inc(i);

  Application.CreateForm(TForm27, Form27);
  form11.LabelStatus.Caption := 'Lade Tagesabschluss';
  form11.ShowNextStep(trunc (i*100/nModulanzahl));
  inc(i);

  Application.CreateForm(TForm29, Form29);
  form11.LabelStatus.Caption := 'Lade Retourenassistenten';
  form11.ShowNextStep(trunc (i*100/nModulanzahl));

  inc(i);

  Application.CreateForm(TForm30, Form30);
  form11.LabelStatus.Caption := 'Lade Bedieneranmeldung';
  form11.ShowNextStep(trunc (i*100/nModulanzahl));

  inc(i);

  Application.CreateForm(TForm31, Form31);
   form11.LabelStatus.Caption := 'Lade Bestellverwaltung';
  form11.ShowNextStep(trunc (i*100/nModulanzahl));

  form11.labelstatus.Caption := 'Alle Module eingelesen. Starte...';

  inc(i);
  Form11.Close;
  Application.Run;
end.



Hat jemand eine Idee? Ich bin für jeden Vorschlag dankbar.

Lieben Gruß

PS. Wie erzeuge ich Delphi-Tags? Die suche ich schon seit 1000 Jahren...

Moderiert von user profile iconGausi: Delphi-Tags hinzugefügt. Das geht mit [delphi]...[/delphi], oder unter "Bereiche" die Tags auswählen

_________________
Lette-Verein MIA
jaenicke
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 19314
Erhaltene Danke: 1747

W11 x64 (Chrome, Edge)
Delphi 11 Pro, Oxygene, C# (VS 2022), JS/HTML, Java (NB), PHP, Lazarus
BeitragVerfasst: Mi 31.10.12 23:15 
user profile iconApo95 hat folgendes geschrieben Zum zitierten Posting springen:
Hallo, ich habe mit mühevoller Kleinarbeit einen Startbildschirm zurechtgekritzelt, aber ich hätte gerne, dass mit neinem Label die Schriftarten des OS eingelesen und angezeigt werden. Bsp: Lade Schriftarten: Arial.ttf... Ferner sollen installierte DLL-Dateien eingelesen, bzw. auf "Anwesenheit" überprüft werden.
An diese Informationen kommst du nicht heran. Nur bei selbst dynamisch geladenen DLLs geht das, indem du es beim Laden direkt prüfst.

Zudem: Was soll das dem Benutzer denn bringen? :gruebel:
Wenn es Fehler gibt, müssen diese geloggt werden, damit man sie analysieren kann.

Was soll eigentlich das Sleep bewirken? Die Ladezeit künstlich zu erhöhen, ist eine der schlimmsten Unarten, die es gibt.

Welche Module geladen sind, bekommst du über EnumModules heraus:
docwiki.embarcadero....e/System.EnumModules
Apo95 Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 129

Win2000, WinXP, WinServer 2003 Standard x86, Win7x64
Delphi 6 Enterprise, D2009 Architect, RAD Studio XE6 Architect
BeitragVerfasst: Do 01.11.12 21:35 
wie binde ich denn das emum ein? Das habe ich bis jetzt noch nie benutzt..

_________________
Lette-Verein MIA
jaenicke
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 19314
Erhaltene Danke: 1747

W11 x64 (Chrome, Edge)
Delphi 11 Pro, Oxygene, C# (VS 2022), JS/HTML, Java (NB), PHP, Lazarus
BeitragVerfasst: Do 01.11.12 21:44 
Naja, sieht laut Doku doch so aus als ob du da eine anonyme Methode übergibst, die dann für jedes Modul aufgerufen wird. Probiere es doch einfach mal...
Apo95 Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 129

Win2000, WinXP, WinServer 2003 Standard x86, Win7x64
Delphi 6 Enterprise, D2009 Architect, RAD Studio XE6 Architect
BeitragVerfasst: Sa 04.05.13 01:15 
Tut mir leid, dass ich er st so spät antworte... ich hatte keine Zeit.. :-( Das mit den DLL's überlege ich mir noch; aber ich denke, es wäre für den Nutzer interessant zu wissen, ob die Einstellungen auch geladen werden. Wäre es möglich, dass er wärend des Startens INI-Dateien einliest? Z.B:

'Initialisiere Einstellungen: Control.conf' oder so ähnlich... .

_________________
Lette-Verein MIA
Gerd Kayser
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 632
Erhaltene Danke: 121

Win 7 32-bit
Delphi 2006/XE
BeitragVerfasst: Sa 04.05.13 09:44 
user profile iconApo95 hat folgendes geschrieben Zum zitierten Posting springen:
Wäre es möglich, dass er wärend des Startens INI-Dateien einliest? Z.B:
'Initialisiere Einstellungen: Control.conf' oder so ähnlich... .

Das passiert aber nicht beim Starten der Anwendung, sondern erst dann, wenn Du vom Programm her darauf zugreifst, z. B. mit

ausblenden Delphi-Quelltext
1:
2:
Ini := TIniFile.Create ...
Ini.Read...