Autor Beitrag
Tchiboo
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 35

Win XP Home, Mac OS

BeitragVerfasst: Di 18.04.06 15:17 
Schönen guten Tag Leute,

ich bin mir nicht sicher ob ich im richtigen Forum bin, wenn nicht bitte verschieben!


Ich hab mehrer Forms erstellt musste aber jetzt rückwirkend noch eine erstellen die an erster Stelle starten soll. Standardmäßig startet meine erst erstellte Form. Wie kann ich nun einstellen, dass die letzte erstellte Form als erstes Startet?

Gruß
Jörg
der Berliner
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 417

Win Xp Home
delphi 2005
BeitragVerfasst: Di 18.04.06 15:22 
Hallo
MENU: Projekt/Optionen da dann auf Formulare und dein Mainform auswählen
Gruß

_________________
[b]Ich weiß nicht immer, wovon ich rede. Aber ich weiß, dass ich recht habe.[b]
Tchiboo Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 35

Win XP Home, Mac OS

BeitragVerfasst: Di 18.04.06 16:00 
hallo berliner,

danke für den tipp, hat super geklappt!

Ich habe aber noch ein problem :)

Ich möchte das ein Script erst ausgeführt wird wenn die Form angezeigt ist!
Ich hab schon mit FormCreate, FormAcitvate probiert aber bin nicht zum Ziel gekommen, da er da zuerst den sript abarbeiten will!

Thx für die Hilfe

Jörg
der Berliner
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 417

Win Xp Home
delphi 2005
BeitragVerfasst: Di 18.04.06 16:03 
ab damit ins OnShow Ereigniss
Gruß

_________________
[b]Ich weiß nicht immer, wovon ich rede. Aber ich weiß, dass ich recht habe.[b]
arcardia
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 48



BeitragVerfasst: Di 18.04.06 16:06 
Wenn die Form wirklich sichtbar sein soll
bevor eine Aktion passiert
dann geht das nur NACH FormShow
leider gibt es kein Event für sowas

also selbst ist der dingsbumms....

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
Const
  WM_AfterShow = WM_User+10// Die Message

//In der deklaration oben
   private
    procedure WMAfterShow(var Msg: TMessage); message WM_AfterShow;
   ...

// Und die Procedure selbst
procedure TMainForm.WMAfterShow(var Msg: TMessage);
begin
   // Hier tun was immer du nach FormShow machen willst...
end;

// Und das wichtigste
procedure TMainForm.FormShow(Sender: TObject);
  PostMessage(Self.Handle, WM_AfterShow, 00);
end;


Moderiert von user profile iconraziel: Code- durch Delphi-Tags ersetzt
der Berliner
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 417

Win Xp Home
delphi 2005
BeitragVerfasst: Di 18.04.06 16:13 
Da hat der/die liebe arcardia natürlich recht :D
gruß

_________________
[b]Ich weiß nicht immer, wovon ich rede. Aber ich weiß, dass ich recht habe.[b]
Tchiboo Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 35

Win XP Home, Mac OS

BeitragVerfasst: Di 18.04.06 16:18 
Hallo Andre!

Ich habe das jetzt mit OnShow probiert, jedoch führt es erst den Script aus bevor er die Form zeigt!

Nochmal Danke!

Jörg
der Berliner
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 417

Win Xp Home
delphi 2005
BeitragVerfasst: Di 18.04.06 16:19 
Nimm das was Arcardia gepostet hat.
Gruß

_________________
[b]Ich weiß nicht immer, wovon ich rede. Aber ich weiß, dass ich recht habe.[b]
Tchiboo Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 35

Win XP Home, Mac OS

BeitragVerfasst: Di 18.04.06 16:29 
Hallo ihr beiden!

Ich hab den Quelltext eingebunden, jedoch kommt bei "postmessage" die Fehlermeldung "unbekannte Anweisung"!
Muss ich noch was in USES eintragen?

Thx a lot!

Jörg
arcardia
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 48



BeitragVerfasst: Di 18.04.06 16:42 
Post/SendMessage ist bestandteil der Unit Windows
notfalls noch Unit Messages eintragen
der Berliner
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 417

Win Xp Home
delphi 2005
BeitragVerfasst: Di 18.04.06 16:44 
Also ich hab folgende uses eingebunden
ausblenden Delphi-Quelltext
1:
2:
3:
uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, StdCtrls;


damit funktioniert es
Gruß

_________________
[b]Ich weiß nicht immer, wovon ich rede. Aber ich weiß, dass ich recht habe.[b]
Tchiboo Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 35

Win XP Home, Mac OS

BeitragVerfasst: Di 18.04.06 16:59 
thx habs gepackt!

hatte ein "begin" vergessen!

:)

Jörg