Unless you have some major and lengthy operations to set up your application
environment the splash screen will close almost immediately. In any case
quite a number of dlls have to be already loaded in order to show the splash
form, hence.....
In VS2005 (if I remember correctly you use VS2003) there is a SplashScreen
item that you can add to your solution and set your application to show it
when it's starting-up. However, it closes down almost immediately after you
start the application.
You have to create some form of delay on your splash screen in order to have
it shown for a longer period of time. Try with the timer control and set the
delay for five seconds.
BR,
GAZ
> What is the best practice to create a splash screen in .net winforms
> applications so that the splash screen loads immediately after we start
[quoted text clipped - 7 lines]
>
> - Angelina
GAZ - 31 Jul 2006 13:21 GMT
With an addition. There is a My.Application.MinimumSplashScreenDispleyTime
property through which you can set up the amount of time the splash screen
stays visible.
BR,
GAZ
> Unless you have some major and lengthy operations to set up your
> application environment the splash screen will close almost immediately.
[quoted text clipped - 25 lines]
>>
>> - Angelina
Angelina - 31 Jul 2006 14:00 GMT
But I am using .NET 1.1 :(
> With an addition. There is a My.Application.MinimumSplashScreenDispleyTime
> property through which you can set up the amount of time the splash screen
[quoted text clipped - 33 lines]
>>>
>>> - Angelina
rhaazy - 31 Jul 2006 15:38 GMT
You should use a main class and call all of your forms from that, so
something like this:
public class clsMain
{
public clsMain()
{
//
// TODO: Add constructor logic here
//
}
[STAThread]
static void Main()
{
frmSplash objfrmSplash = new frmSplash();
objfrmSplash.ShowDialog();
clsGlobal.g_objfrmMDIMain = new frmMDIMain();
Application.Run(clsGlobal.g_objfrmMDIMain);
}
//This is the Single Threaded Apartment Model(out of our scope) of the
application which will run the Main function
//when the application starts
}
on your splash screen form place a timer that closes the form after a
few seconds.
(Note:) dont forget to remove the main class from the form that may
already be your main form.
/// <summary>
/// The main entry point for the application.
/// </summary>
//[STAThread]
//static void Main()
//{
// Application.Run(new Form1());
//}
//because we cannot have two Main function.We are invoking everything
from clsMain
> But I am using .NET 1.1 :(
>
[quoted text clipped - 35 lines]
> >>>
> >>> - Angelina