So, I click on a button or whatever and another form takes the place of current one like in an installation wizard for instance....
Also how could I pass the data from one form to another upon the same event?
Printable View
So, I click on a button or whatever and another form takes the place of current one like in an installation wizard for instance....
Also how could I pass the data from one form to another upon the same event?
let's say you want to pass a string from form 1 to form 2
so , in your button click event handler in form1 add something like this
form2 f2 = new form2(string stringiWantToPass);
f2.showDialog();
so just make yourself a custom constructor for making form2, you can also pass your form1 instance to form2.
form2 f2 = new form2 (this);
your constructor in form2 should look like this:
public form2(System.Windows.Forms form)
{
...
}
there will be also other ways of doing this ;)
Hope this one will do. Thanx. :)