C # implementation of a scrolling subtitle animation form

Source: Internet
Author: User

Tip:You can double-click the program to launch the program. (Of course, the task manager can also ...)
The procedure is as follows:
1. Create a new form, set the FormBorderStyle attribute of the form to None, and the "TransparencyKey" attribute to "Control ".
2. Use one Label space, any Text writing, Font and other style customization.
3. Use one Timer space, set its Enable to True, and Interval to 100;
4. Add the Form1 form loading event. The Code is as follows: Copy codeThe Code is as follows: private void Form1_Load (object sender, EventArgs e)
{
This. timer1.Interval = 10;
This. timer1.Enabled = true;
This. WindowState = FormWindowState. Maximized;
}

5. Add the Tick Event code of the Timer1 space:Copy codeThe Code is as follows: private void timerjavastick (object sender, EventArgs e)
{
Label1.Left-= 2;
If (label1.Right <0)
Label1.Left = this. Width;
}

6. Add the closing window function for the tag click event:Copy codeThe Code is as follows: private void label1_Click (object sender, EventArgs e)
{
This. Close ();
}

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.