Siehe:
http://social.msdn.microsoft.com/Forums/de-DE/vcplusexpresseditionde/thread/af37a509-4829-4f63-8235-95ed11c6e02e
Also:
Das hier ist das Form, welches aufgeht:
ref class ZielForm : public Form
{
// ...
public: property String ^MeinText
{
String^ get() { return this->label1->Text; }
void set(String^ value) { this->label1->Text = value; }
}
};
Hier ist das Form, welches das Hauptform ist und den "MeinText" im Label anzeigen soll, dann sieht die Funktion, welches das ZielForm1 aufruft so aus:
void button1_Click(Object^ sender, EventArgs^ e)
{
ZielForm f;
f.MeinText = "Hallo Welt";
if (f.ShowDialog(this) == DialogResult::Ok)
{
this->textBox1->Text = f.MeinText;
}
}
Jochen Kalmbach (MVP VC++)