C # authoring Software Launch interface

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.