zoukankan      html  css  js  c++  java
  • 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

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

  • 相关阅读:
    Mockito一个方法的实例
    LIst与ArrayList区别
    mockito入门学习
    eclipse中调整字体大小和改变背景颜色
    常用sql语句
    eclipse导入代码和重新编译
    windows下登录linux的常用工具SecureCRT和常用命令
    junit4
    接口测试
    java环境
  • 原文地址:https://www.cnblogs.com/hanke123/p/6529273.html
Copyright © 2011-2022 走看看