Hello,
I have a splash screen as my main form:
/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
static void Main()
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new SplashForm());
}
And I want to dispose it after loading my main form. How can do that
When I do this.Dispose() the whole application is closing!
Someone told me that I should use a non-forms class as your startup object. That non form class can be a module or a regular class.
How can I do that When I added a class and made that class the startup object the project didn't compile.
TIA.

How can I dispose the main form without quiting the application?
Daniel Rosales
I think your question has been answered in another thread that you started:
http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=401301&SiteID=1
I agree with their responses Spawning the splash screen from the main form is a good idea, and the Code Project link is good.
If you don't want your main form to show while your splash screen is visible then hide the form until the close event of the splash screen occurs.
Good luck
dbhartiya
Application.Run(new SplashForm());
This is default method of running application, which sets form as main application form. When such form is closed, aplication message loop terminates.
Using the ApplicationContext Class allows to write more flexible scenarios. You can read more about this in MSDN article, including code sample with two main forms:
http://msdn2.microsoft.com/en-us/library/system.windows.forms.applicationcontext.aspx