C#应用编程小例子-01-渐显的窗体

2021-06-22 01:04

阅读:389

标签:lse   opacity   public   font   led   show   分享   ble   tick   

 

  • C#应用编程小例子-01-渐显的窗体
using System;
using System.Windows.Forms;

namespace WindowsFormsApp2
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void Form1_Load(object sender, EventArgs e)
        {
            this.Hide();
            timer1.Interval = 50;
            this.Opacity = 0;
            this.Show();
            this.timer1.Enabled = true;
            
            
        }

        private void timer1_Tick(object sender, EventArgs e)
        {
            if (this.Opacity1)
            {
                this.Opacity += 0.05;

            }
            else
            {
                this.timer1.Enabled = false;
            }
        }
    }
}

技术分享图片

 

 技术分享图片

 

C#应用编程小例子-01-渐显的窗体

标签:lse   opacity   public   font   led   show   分享   ble   tick   

原文地址:https://www.cnblogs.com/landv/p/10220573.html


评论


亲,登录后才可以留言!