Create a software start-up interface
1, create a new project, the default generated interface as the start-up interface.
2. Add a label and ProgressBar and a timer control
Note: In the ProgressBar control, you need to set its style to marquee (in the form of a marquee) or it will not show the effect of the progress bar running.
3. Close the Maximize and Minimize buttons
4. Add code to the window's creation function
Private void Form1_Load (object sender, EventArgs e) { 0; Set the minimum value of ProgressBar component to 0 ; The maximum value of maximum is ten ; Set the time period timer1 the progress bar to move quickly . Start (); // start timer }
5, Timer control property settings (should be the timer control the number of times is 1ms so fill in the interval 3000 means three seconds after entering the timer to the event)
6, timer to the event handler function
Private void Timer1_Tick (object sender, EventArgs e) { // Timing time to processing event This . Hide (); // Hide this form New Startupinterface (); // instantiate a MainForm object Mainform.show (); // Show Form Timer1. Stop (); // Custom Timer }
7. Add a new form
8. Add the closing event of the new form, close the code of the startup form
Private void Fromclosed (object sender, Formclosedeventargs e) { application.exit (); // exit application }
Reference layouts
beautify the form
Add a background to a form
Select the BackColor property to add a background color
Add a background picture
C # authoring Software Launch interface