An sowas ähnlichem arbeite ich auch gerade...
du rufst es auf :
Delphi-Quelltext
1: 2: 3: 4:
| frmSprachen := TSprachen.Create ; frmSprachen.TopLevel := false; frmSprachen.Visible := True; frmSprachen.BringToFront ; |
(frmSprachen ist ein Formular namens TSprachen)
ich persönlich habe noch einen Verweis auf TSprachen als glActiveForm (Im Create)
Jetzt kann ich aus dem Hauptform glActiveForm überall ansprechen mit :
Delphi-Quelltext
1:
| (glActiveForm as TSprachen).test('Das ist ein toller Test'); |
Test ist eine Procedure mit einem Parameter : String, wird nur ne Messagebox ausgegeben.
Ansonsten kannst du auch das Form mit Create erzeugen und dann direkt dort ansprechen :
Delphi-Quelltext
1: 2: 3: 4: 5:
| frmSprachen := TSprachen.Create ; frmSprachen.TopLevel := false; frmSprachen.Visible := True; frmSprachen.BringToFront ; frmSprachen.Test('Test'); |
Modal / Nicht Modal :
Nicht Modal
Delphi-Quelltext
1: 2: 3: 4: 5:
| with Sprachen.TSprachen.create do begin Owner := self; Show; StartPosition := formstartposition.CenterScreen ; end; |
Modal
Delphi-Quelltext
1: 2: 3: 4: 5:
| with Sprachen.TSprachen.create do begin Owner := self; ShowDialog; StartPosition := formstartposition.CenterScreen ; end; |
Mein Problem ist : Ich habe mehrere Forms in denen ich immer die selben Funktionen habe, z.b.: Neu.
Wie kann ich die Dinger mit Late Binding ansprechen ?
Hm... für Deine Zwecke sollte es so genügen, ich mach mal wieder nen neuen Thread für mich auf...