Before you start the Windows desktop program, you will typically design a wait animation before you wait for the main program to run, and if the main program is up, the scene animation will disappear.
WFP provides this small and useful feature SplashScreen class
There are generally two ways to implement
1. Using the VS2008 tool, you can achieve
The first step is to choose a suitable picture bmp,jpg,gif. Add to your VS project.
The second right button this picture file Select "Properties",
Step three click on the "Build Action" drop-down box in the property to select "SplashScreen".
This enables the animation function of the process
2. The second way is the programming approach
The first step is still to select a picture to add to the project, add directly to the project under the line, as a normal file. (not necessarily added to the resource)
The second step is to instantiate the object
SplashScreen ss = new SplashScreen ("dsc_0036.jpg");/parameter is the name of the picture, note the path.
Ss.show (TRUE)//only if the Show method is called, the procedure animation is displayed, there is a bool type input parameter, and if true,
This scene animation will close itself when the main program is displayed, and if it is a false type, this animation is not closed,
Only explicit calls to the Close method
Ss. Close (new TimeSpan (0,0,10));//Here are the parameters TimeSpan is named how long after SS closes
The above code should be implemented in the protected override void Onstartup (StartupEventArgs e) in the App class
The closing effect is progressive