Passing Parameters to form
I am trying to figure out how to pass parameters to a form before the form is displayed.
For instance I am opening 1 form from another form:
Form g = new frmMainForm();
g.ShowDialog() ;
In VB 6 I would create properties with PropertyGet and ProperyLet and would set for instance the value of a property before opening the form:
Form g = new frmMainForm();
g.UserID = 1;
g.ShowDialog() ;
How can I accomplish making the property UserID a property and making it accessible when instantiating this form.
I tried using the get and set Accessors but that doesn't seem to work.