Renzo,
My preference is to have two application loops, like so:
// Show the login form.
Application.Run(new LoginForm());
// Show the Calendar form.
Application.Run(new CalendarForm());
If you need access to the variables, you could do something like:
// The login form.
LoginForm lf = new LoginForm();
// Show the login form.
Application.Run(lf);
// The calendar form. Initialize with login form to get access to it.
CalendarForm cf = new CalendarForm(lf);
// Show the form.
Application.Run(cf);
Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
-
mv*@spam.guard.caspershouse.com
"Renzo" <Re***@discussions.microsoft.com> wrote in message
news:CD**********************************@microsof t.com...
hi ! i've recently begun developing in c# and i'd like to know what's the
best way of calling a form from an already instanced form ? I have done a
"Login" form which I run in the Main() using "Application.Run(...)", now
when
the user logins correctly, another form named "Calendar" must be called.
How
can I do this ? Should I close the first form first and then instance the
new one or how ? Thanks.