winfrom 右下角弹窗(渐渐消失)

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace SCM.Forms
{
    public partial class Frm_ZZShowMess : Form
    {
        public Frm_ZZShowMess()
        {
            InitializeComponent();
        }

        System.Drawing.Rectangle rec;
        public String TTx = "";
        private void Frm_ZZShowMess_Load(object sender, EventArgs e)
        {
            labelX1.Focus();
          rec = Screen.GetWorkingArea(this);

            textBoxX1.Text = TTx;
            for (int a = 0; a < this.Height; a++)
            {
                System.Threading.Thread.Sleep(10);
                a = a + 10;
                this.Location = new Point(rec.Width - this.Width, rec.Height - a);
                //System.Threading.Thread.Sleep(10);
            }
            
        }

        private void pictureBox1_Click_1(object sender, EventArgs e)
        {
            int xx = this.Location.X;
            int ggd = this.Location.Y;
            int yy = this.Height;
            for (int a = 0; a < this.Height; a++)
            {
                a = a + 10;
                this.Location = new Point(xx, ggd+ a);
                System.Threading.Thread.Sleep(10);
            }
            this.Close();
        }
    }
}

图1

线程的使用方面 :打开就得关闭    

原文地址:https://www.cnblogs.com/hanke123/p/6529273.html