Autor Beitrag
mexx
ontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic starofftopic star
Beiträge: 1183



BeitragVerfasst: Do 24.04.03 09:58 
Ich habe ein sehr aufwendige DB-Anwendung geschrieben. Beim aktivieren der Anwendung merkt man schon, dass es ein bissel länger dauert, bis man was sieht. Da ich leider den Fehler gemacht habe und die mainform gleich form1 genommen habe, weis ich nicht, wie ich einen ladebildschirm einbauen kann.
Habt Ihr eine Idee?
Tino
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Veteran
Beiträge: 9839
Erhaltene Danke: 45

Windows 8.1
Delphi XE4
BeitragVerfasst: Do 24.04.03 10:09 
Hallo,

das nennt sich SplashScreen und wurde schon mehrmals ihr im Forum behandelt. Außerdem gibt es extra einen FAQ Beitrag: ...einen SplashScreen anzeigen?

Gruß
Tino
mexx Threadstarter
ontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic starofftopic star
Beiträge: 1183



BeitragVerfasst: Do 24.04.03 10:25 
Irgendwie funzt das bei mir nicht.
Tino
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Veteran
Beiträge: 9839
Erhaltene Danke: 45

Windows 8.1
Delphi XE4
BeitragVerfasst: Do 24.04.03 10:30 
mexx hat folgendes geschrieben:
Irgendwie funzt das bei mir nicht.

Und was funktioniert nicht? Du musst schon etwas genauer werden!

Gruß
Tino
mexx Threadstarter
ontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic starofftopic star
Beiträge: 1183



BeitragVerfasst: Do 24.04.03 11:56 
thx, hab es raus. Gibt nur ein Problem. Der Ladebildschrim erscheint zwar, nur ohne Inhalt, sprich Labels oder Bilder. Sleep funzt da auch nicht.
Simon Joker
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 236
Erhaltene Danke: 1



BeitragVerfasst: Do 24.04.03 12:51 
Warum Sleep? Du willst doch, daß dein Prog was macht, nämlich den Splash zeichnen. Probiers mal mit Application.ProgressMessages.
MathiasSimmack
Ehemaliges Mitglied
Erhaltene Danke: 1



BeitragVerfasst: Do 24.04.03 13:04 
Update fehlt im Codebeispiel von Tino. Das ist alles. - Bei mir sieht das so aus:
ausblenden Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
with TWaitForm.Create(nil) do
try
  ActionLabel.Caption := 'initialisiere';
  pb1.Position := 0;
  Show;
  Update;

  Application.CreateForm(TButlerForm, ButlerForm);
  pb1.Position := MulDiv(1,100,10);

  // usw.
  { ... }
finally
  Free;
end;

Das Prinzip ist das gleiche. Ein Label, ein Progressbar ... klappt.

Gruß.
Tino
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Veteran
Beiträge: 9839
Erhaltene Danke: 45

Windows 8.1
Delphi XE4
BeitragVerfasst: Do 24.04.03 13:26 
MathiasSimmack hat folgendes geschrieben:
Update fehlt im Codebeispiel von Tino.

Habs in der FAQ hinzugefügt!

Gruß
Tino
Blackout
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 64



BeitragVerfasst: Do 24.04.03 16:32 
@mexx
egal welche Form, kannst auch ne neue Splashform einbauen. So wäre das auch ne schöne Lösung...

Project1.dpr - Beispiel:
ausblenden 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:
Program Project1;

Uses
  Forms,
  Unit1 In 'Unit1.pas' {Main},
  Unit2 In 'Unit2.pas' {Splash},

{$R *.res}

Begin
  Application.Title:= 'Initialisiere';
  Splash:= TSplash.Create(Application);
  Try
    Splash.Show;
    Application.Initialize;
    Application.CreateForm(TMain, Main);
    // alle weiteren Formulare
    Splash.Update;
    Application.Title:= 'Beispiel';
  Finally
    // Hier vielleicht nochn Timer, der auf der Splashform
    // sitzt, aktivieren und wenn z.B. 2 Seks um sind dann
    // schließt sich Splash
  End;
  Application.Run;
End.


OK :roll: wie ich gerade gesehen hab ist das ja das gleiche wie in der FAQ :D

_________________
MfG Blackout
Terra23
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 872

Win 8
Delphi 7
BeitragVerfasst: Fr 25.04.03 21:36 
Das mit dem Splashscreen ist echt nicht schlecht. Ich habe einfach auf meine Form ein Panel gesetzt, einen ProgressBar drauf und mit Timer wird der hochgezählt, dann verschwindet er. Mein Programm hat zwar nicht elend viel, was es laden muß (genaugenommen wenig) aber ich fand das witzig, sowas mal einzubauen. :-)

_________________
Hasta La Victoria Siempre
ShiKai
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 56



BeitragVerfasst: Sa 03.05.03 23:22 
einen splashscreen, auch wenn er nicht benötigt wird?

unter den guten, zum glück ALTEN VB zeiten, habe ich mit vorliebe splashscreens eingebaut, allerdings sollte man damit vorsichtig sein. ich habe seinerzeit herbe kritik bekommen, weil die teiel, wenn sie keinen sinn haben, einfach mal nerven und zeit kosten.

zudem sollte man wissen, wie man die designed. es gibt ziemlich hässliche beispiele. (meine wahren nätürlich immer top designed, davon mal
abgesehen :-))

Moderiert von user profile iconTino: Überflüssige Absätze entfernt.