Autor Beitrag
eniac
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 75

Win 98, Win XP, SuSE Linux 9.0
D3 Prof
BeitragVerfasst: Fr 03.06.05 12:57 
Servus,


Bei jedem Projekt kann man ja über Projekt -> Optionen vor dem Kompilieren festlegen, welche Formulare zu Beginn sichtbar sein sollen und welches das Hauptformular (main form) ist.
Ich habe jetzt eine MDI-Anwendung geschrieben und seltsamer Weise muss das "Mutter-Fenster" auch das Hauptformular des Projekts sein. Das will ich allerdings nicht!
Die Lösung die mir dazu eingefallen ist, ist es das Hauptformular zur Laufzeit noch nachträglich zu ändern :!:
Geht das überhaupt :?:

Ich bin für jeden brauchbaren Einfall dankbar...

_________________
Manche Leute haben den Horizont in Form eines Kreises mit Radius Null und das nennen sie dann einene Standpunkt.
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: Fr 03.06.05 13:04 
das fomular welches zuerst erstellt wird ist das hauptformular, das kann man natürlich ändern, aber zur laufzeit hm :?:
BenBE
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 8721
Erhaltene Danke: 191

Win95, Win98SE, Win2K, WinXP
D1S, D3S, D4S, D5E, D6E, D7E, D9PE, D10E, D12P, DXEP, L0.9\FPC2.0
BeitragVerfasst: Fr 03.06.05 13:07 
Jip. Funktioniert.

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
procedure SetMainform(NewMainform: TForm);
var
  TmpMain: ^TCustomForm;
begin
  TmpMain := @Application.Mainform;
  TmpMain^ := NewMainForm;
end;

_________________
Anyone who is capable of being elected president should on no account be allowed to do the job.
Ich code EdgeMonkey - In dubio pro Setting.
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: Fr 03.06.05 13:08 
hätte ich das vorher gewusst :lol:
BenBE
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 8721
Erhaltene Danke: 191

Win95, Win98SE, Win2K, WinXP
D1S, D3S, D4S, D5E, D6E, D7E, D9PE, D10E, D12P, DXEP, L0.9\FPC2.0
BeitragVerfasst: Fr 03.06.05 13:12 
FYI:
Das funktioniert deshalb, weil die VCL TApplication.MainForm über das interne Feld FMainform anstatt einer Zugriffsfunktion liest.

_________________
Anyone who is capable of being elected president should on no account be allowed to do the job.
Ich code EdgeMonkey - In dubio pro Setting.
eniac Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 75

Win 98, Win XP, SuSE Linux 9.0
D3 Prof
BeitragVerfasst: Fr 03.06.05 13:43 
thx

so funzt es! :lol:

_________________
Manche Leute haben den Horizont in Form eines Kreises mit Radius Null und das nennen sie dann einene Standpunkt.