Hello Friends, We all have seen the Splash Screens of MS visual Studio , Phtoshop etc. it makes our Applications Look Great. So in this Tutorial we are going to tell u that how to add the splash screen to the Window Based Applications.
Examples of Splash...
1. Start visual studio and create a new project (ctrl+shft+N).
(Note. Keep in mind select the visual C# in the left panel).
3. By default a window containing the form will open. Select the form and change some property of the form as given below.
a) Name property = “SplashScreen”.
b) Back color property = Gray (select web in the back color property and then select gray which is at the fourth position).
c) Transparency Key property= same as that of back color property (gray).
d) Form border sytle = “none”.
e) Start position =center.
4. Now open toolbar (alt+ctrl+X). And select the Picture box and double click it.
5. Select the form again. Now there will be a picture box. Select the arrow button (top-left) as given below and select “Dock in Parent Control
6. Now select the image property of the picture box and select the import button shown below and select the image that you want show on the startup of the application.I am going to select below given image.
7. Now adjust the width of the form according the image that you select.
8. Select the form’s property and change Start Position to “center”
9. Add new form which will show after the “splash screen”(like I have made a simple form of sending emails and set the name to sendingEmails).
10. Add a timer to the splashscreen form and change the name of timer to “timerof”.
11. Now select the splashsreen, right click and select the view code and paste the coding below the “intializecmponent()”. Coding is given below.
timerof.Enabled = true;
timerof.Interval = 3000;
12. Go to design view and double click on timer and paste the coding in between the curly braces as given below.
timerof.Stop();
this.DialogResult = DialogResult.OK;
this.Close();
13. It will look like.
14. This step is very important because setting of opening the splash form rather than other. Open the solution explorer and right click on the “program.cs” file.
15. Now paste below given code
SplashScreen s = new SplashScreen();
if (s.ShowDialog() == DialogResult.OK)
{
Application.Run(new SendingEmails());
}
if (s.ShowDialog() == DialogResult.OK)
{
Application.Run(new SendingEmails());
}
It will look like.
Save it and run it (ctrl+F5)
Notice : Now Please click on the below or right hand side Adds (image or text).
Follow these easy step and Enjoy.
I have always waiting for your priceless comment regarding the tutorial, so feel free to comment
I have always waiting for your priceless comment regarding the tutorial, so feel free to comment
Notice : Now Please click on the below or right hand side Adds (image or text).
Post a Comment