Hi
Ich nehme für solche Proceduren und Functions nicht visuelle Forms z. B. eignet sich das Datenmodul dafür. Dort werden die Proceduree und Functions unter Publik deklariert und anschließend im Implementationsteil programmiert.
zb.
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:
| MyDatamodul Public ..... Function MyFunction1(Übergabewerte: VariablenTyp): Variablentyp; .... Procedure MyProcedure(Übergabewerte: VariablenTyp); ...
Implementation
Function TMyDatamodul.MyFunction1(Übergabewerte: VariablenTyp): Variablentyp; Begin .... .... Result :=irgendwas; end;
.... Procedure TMyDatamodul.MyProcedure(Übergabewerte: VariablenTyp); Begin
mein Programm end; |
Diese rufst du in anderen Formularen mit vorangestelltem Variablennamen der Form
z. Aufruf in einem anderen Formular:
Delphi-Quelltext
1:
| Ergebnis:=MyDatamodul.MyFunction(....); |
oder
Delphi-Quelltext
1:
| MyDatamodul.MyProcedure; |
Beachte aber, das du in diesen Procedures keine Objekte des aufrufenden Formulares ansprichst.
Gruß oldmax
Zier dich nich so, ich krieg dich schon....