Soetwas funktioniert zb über den Konstruktor, dieser wird beim erstellen eines Objektes aufgerufen zb (Frei Hand - sinngemäß):
Zitat:
public class Form1 : Forms{
public Form1(string tb1, string tb2, string tb3{
tb1.Text = tb1;
tb2.Text = tb2;
tb3.Text = tb3;
}
}
class x
{
void irgendeineFunktion(){
Form1 myForm = new Form1(tb1.Text, tb2.Text, tb3.Text);
}
}
|