Autor Beitrag
Josef-B
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 293

2003 Server, Win7, Win8
Delphi 2010 Pro, Firebird 2.5
BeitragVerfasst: Fr 11.07.03 09:35 
Ich habe eine String Variable b. Diese erhält in Formular 1 einen Wert. Beim Schließen des Fomulars, soll der Wert in Formular 2 weiterverarbeitet werden. in Formular 2 habe ich auch uses gesetzt.

Das Problem ist, nach dem Schließen ist der Wert für b weg und in Formular 1 nicht verfügbar. Woran kann das liegen?
hansa
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 3079
Erhaltene Danke: 9



BeitragVerfasst: Fr 11.07.03 10:24 
An welches b willst Du dran? Es könnte ja auch eines pro Form, Prozedur usw. geben. Normalerweise brauchst Du nur das:

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
unit Form2;
...
uses Form1.....

...
Form2.b :=  Form1.b;

_________________
Gruß
Hansa
CenBells
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 1547

Win 7
Delphi XE5 Pro
BeitragVerfasst: Fr 11.07.03 10:59 
kann es vielleicht daran liegen, daß du dein formular frei gibst? Also das du an irgendeiner stell Form.free sagst, oder in der OnClose Methode als action caFree angibst?

Gruß
Ken

_________________
Eine Klasse beschreibt die Struktur und das Verhalten einer Menge gleichartiger Objekte.
Josef-B Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 293

2003 Server, Win7, Win8
Delphi 2010 Pro, Firebird 2.5
BeitragVerfasst: Fr 11.07.03 11:24 
Ja stimmt, action cafree ist gesetzt.

Ich habe jetzt noch mal bei Implementation in Form1 die Unit form2 eingeben, da gehts dann auch.