How to move between two or more forms?

  • Thread starter Thread starter EMW
  • Start date Start date
E

EMW

My program starts with a splashscreen, while it is showing, it should load
the two orther forms.
The user must be able to move between the two other forms without losing the
info he put in the textboxes.

How?

thanks,
Eric
 
Eric,
Create variables for the forms you wish to show,
including the slash screen. Call Show() on the forms and
then Application.Run(mainForm) for the Form that is you
applications main window.

Example: from inside Main for simplicity's sake

Form splashForm = new Form();
Form toolForm = new Form();
Form mainForm = new Form();

splashForm.Show();
toolForm.Show();
System.Windows.Forms.Application.Run(mainForm);
 
That doesn't work, Mark.

I created a sub Main:

Public firstForm As frmMain

Public secondForm As frmInfo

Public splashForm As frmSplash

Sub main()

firstForm = New frmMain

secondForm = New frmInfo

splashform = New frmSplash

splashForm.ShowDialog()

secondForm.Hide()

splashForm.Hide()

System.Windows.Forms.Application.Run(firstForm)

End Sub


But I get an exception before it executes the sub Main.

On the firstForm and secondForm there are buttons to swap between them and
the just Hide and Show the forms.
On the splashform there is a timercontrol that wil close the splashform, so
it can continue in the sub Main.

more help please ;)

thanks,
Eric
 
Back
Top