Autor Beitrag
F34r0fTh3D4rk
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 5285
Erhaltene Danke: 29

Win Vista (32), Win 7 (64)
Eclipse, SciTE, Lazarus
BeitragVerfasst: Mo 02.05.05 14:07 
Hallo erstmal !

Ich habe ein Programm geschrieben und möchte, dass wenn es startet so ein kleines Formular kommt, mit dem Titel und dem Entwickler, dieses soll dann nach 10 sekunden vertschwinden und dann soll das hauptformular erscheinen.

So das Formular welches nach 10 sekunden verschwindet war ja kein problem, aber wie zeige ich es vor dem hauptformular an, ohne es selbst zum hauptformular machen zu müssen (es schließt sich ja selbst) ? im on create oder on show vom hauptform funzt es auch net, hab schon zu ziemlich alles durch, aber nischt funzt :!:

Wie mache ich des denn am geschicktesten, ich hab das hier auch schon bei einigen programmen gesehen, aber die waren dann net opensource :lol:

Danke schonmal
bockwurst
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 191

win98 /XP
D1 D5 Prof DE2005PE
BeitragVerfasst: Mo 02.05.05 14:28 
Du must die Formulare in deiner Projekt Datei erzuegen
ungefähr so:

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:
program TEST;

uses
  Forms,
  Controls,
 

{$R *.RES}

begin
  ...
  // Mauszeiger auf SQL setzen
  Screen.Cursor := crSQLWait;

  // StartLogo kreieren uns anzeigen //
  LogoForm := TLogoForm.Create(Application);
  LogoForm.Show;  // zeigen
  LogoForm.Update;  // mit Images und Label

  LogoForm.ProgressBar1.Position := 20;
  Application.HelpFile    := 'Hilfedatei.hlp';
  Application.CreateForm(TForm, Form01);
  Application.CreateForm(TForm, Form02);
  LogoForm.ProgressBar1.Position := 40;
  Application.CreateForm(TForm, Form03);
  LogoForm.ProgressBar1.Position := 60;
  Application.CreateForm(TLaufanzeigeForm, LaufanzeigeForm);
  LogoForm.ProgressBar1.Position := 80;
  Application.CreateForm(TInfoForm, InfoForm);
  LogoForm.ProgressBar1.Position := 100;

  // StartLogo vertecken
  LogoForm.Hide;
  // StartLogo löschen
  LogoForm.Free;
  Screen.Cursor := crDefault;

  // Anwendung starten
  Application.Run;
end.
F34r0fTh3D4rk Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 5285
Erhaltene Danke: 29

Win Vista (32), Win 7 (64)
Eclipse, SciTE, Lazarus
BeitragVerfasst: Mo 02.05.05 14:32 
danke, habe ich noch nicht gewusst, feelin' dunk ! :D
F34r0fTh3D4rk Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 5285
Erhaltene Danke: 29

Win Vista (32), Win 7 (64)
Eclipse, SciTE, Lazarus
BeitragVerfasst: Mo 02.05.05 14:36 
TLogoForm kennt er net :?

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
program TGen;

uses
  Forms,
  UMain in 'UMain.pas' {Form_TGen},
  UAbout in 'UAbout.pas' {Form_Info};

{$R *.res}

begin
  Application.Initialize;
  Application.CreateForm(TForm_TGen, Form_TGen);
  Application.CreateForm(TForm_Info, Form_Info); //Will ich vor Form_TGen anzeigen lassen
  Application.Run;
end.
F34r0fTh3D4rk Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 5285
Erhaltene Danke: 29

Win Vista (32), Win 7 (64)
Eclipse, SciTE, Lazarus
BeitragVerfasst: Mo 02.05.05 15:35 
hab dann jezz doch des intro bild als haupt form genommen und zwar so:
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
program TGen;

uses
  Forms,
  UMain in 'UMain.pas' {Form_TGen},
  UAbout in 'UAbout.pas' {Form_Info};

{$R *.res}

begin
  Application.Initialize;
  Application.CreateForm(TForm_Info, Form_Info);  
  Application.CreateForm(TForm_TGen, Form_TGen);
  Application.Run;
end.

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
procedure TForm_Info.FormShow(Sender: TObject);
begin
  Form_TGen.Hide;
  counter.Enabled:= true;
end;

procedure TForm_Info.counterTimer(Sender: TObject);
begin
  Form_TGen.Show;
  Form_Info.hide;
end;

procedure TForm_Info.FormHide(Sender: TObject);
begin
  counter.Enabled:= false;
end;

ausblenden Delphi-Quelltext
1:
2:
3:
4:
procedure TForm_TGen.FormClose(Sender: TObject; var Action: TCloseAction);
begin
  form_info.Close;
end;

es sei denn, jemandem fällt was besseres ein, dann immer her damit ! :D
Motzi
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 2931

XP Prof, Vista Business
D6, D2k5-D2k7 je Prof
BeitragVerfasst: Mo 02.05.05 15:42 
Damit ist aber Form_Info dein Hauptfenster, was wohl nicht ganz gewünscht ist... ich würde dir empfehlen dir das Tutorial von Sakura anzugucken: www.delphipraxis.net...+splash+screens.html

_________________
gringo pussy cats - eef i see you i will pull your tail out by eets roots!
F34r0fTh3D4rk Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 5285
Erhaltene Danke: 29

Win Vista (32), Win 7 (64)
Eclipse, SciTE, Lazarus
BeitragVerfasst: Mo 02.05.05 15:52 
ja so gehts auch :D ist mir aber dafür den aufwand nicht wert, es sei denn, es gibt große nachteile, wenn das eigentliche prog net des hauptform ist :shock: :?

Was auch nicht der Fall zu sein scheint