>Hi.
>How do you call a form with a parameter, and then use the parameter in the called form.
>
>(IN VFP, this is done by: Do Form MyCalledForm with MyParam1,MyParam2 and then in the Init of the MyCalled form, The MyParam1 and MyParam2 could be saved to properties of the MyCalledForm
>
>Any help appreciated.
>Regards,
>Gerard
A form has a constructor (that correspond to init in VFP) just like any other class. Prepare it to accept parameters then create an instance with parameters and show. ie:
public SecondForm(string passed)
{
InitializeComponent();
textBox1.Text = passed;
}
SecondForm sf = new SecondForm("Some text");
sf.Show();
Cetin