Autor |
Beitrag |
Apo95
      
Beiträge: 129
Win2000, WinXP, WinServer 2003 Standard x86, Win7x64
Delphi 6 Enterprise, D2009 Architect, RAD Studio XE6 Architect
|
Verfasst: 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.:
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:
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' , Unit3 in 'Unit3.pas' , Unit4 in 'Unit4.pas' , Unit5 in 'Unit5.pas' , Unit6 in 'Unit6.pas' , Unit7 in 'Unit7.pas' , Unit8 in 'Unit8.pas' , Unit9 in 'Unit9.pas' , Unit10 in 'Unit10.pas' , Unit11 in 'Unit11.pas' , Unit2 in 'Unit2.pas' , Unit12 in 'Unit12.pas' , Unit13 in 'Unit13.pas' , Unit14 in 'Unit14.pas' , Unit15 in 'Unit15.pas' , Unit16 in 'Unit16.pas' , Unit17 in 'Unit17.pas' , Unit18 in 'Unit18.pas' , Unit19 in 'Unit19.pas' , Unit20 in 'Unit20.pas' , Unit21 in 'Unit21.pas' , Unit22 in 'Unit22.pas' , Unit23 in 'Unit23.pas' , Unit24 in 'Unit24.pas' , Unit25 in 'Unit25.pas' , Unit26 in 'Unit26.pas' , Unit27 in 'Unit27.pas' , Unit29 in 'Unit29.pas' , Unit30 in 'Unit30.pas' , Unit31 in 'Unit31.pas' , Unit32 in 'Unit32.pas' , Unit33 in 'Unit33.pas' , Unit34 in 'Unit34.pas' ;
{$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(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 Gausi: Delphi-Tags hinzugefügt. Das geht mit [delphi]...[/delphi], oder unter "Bereiche" die Tags auswählen
_________________ Lette-Verein MIA
|
|
jaenicke
      
Beiträge: 19314
Erhaltene Danke: 1747
W11 x64 (Chrome, Edge)
Delphi 11 Pro, Oxygene, C# (VS 2022), JS/HTML, Java (NB), PHP, Lazarus
|
Verfasst: Mi 31.10.12 23:15
Apo95 hat folgendes geschrieben : | 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?
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 
      
Beiträge: 129
Win2000, WinXP, WinServer 2003 Standard x86, Win7x64
Delphi 6 Enterprise, D2009 Architect, RAD Studio XE6 Architect
|
Verfasst: 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
      
Beiträge: 19314
Erhaltene Danke: 1747
W11 x64 (Chrome, Edge)
Delphi 11 Pro, Oxygene, C# (VS 2022), JS/HTML, Java (NB), PHP, Lazarus
|
Verfasst: 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 
      
Beiträge: 129
Win2000, WinXP, WinServer 2003 Standard x86, Win7x64
Delphi 6 Enterprise, D2009 Architect, RAD Studio XE6 Architect
|
Verfasst: 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
      
Beiträge: 632
Erhaltene Danke: 121
Win 7 32-bit
Delphi 2006/XE
|
Verfasst: Sa 04.05.13 09:44
|
|
|