• C# winform 右下角弹出窗口结果


    using System.Runtime.InteropServices;
     
    [DllImport("user32")]
    private static extern bool AnimateWindow(IntPtr hwnd, int dwTime, int dwFlags);
     
    //下面是可用的常量,按照不合的动画结果声明本身须要的
    private const int AW_HOR_POSITIVE = 0 x0001;//自左向右显示窗口,该标记可以在迁移转变动画和滑动动画中应用。应用AW_CENTER标记时忽视该标记
    private const int AW_HOR_NEGATIVE = 0 x0002;//自右向左显示窗口,该标记可以在迁移转变动画和滑动动画中应用。应用AW_CENTER标记时忽视该标记
    private const int AW_VER_POSITIVE = 0 x0004;//自顶向下显示窗口,该标记可以在迁移转变动画和滑动动画中应用。应用AW_CENTER标记时忽视该标记
    private const int AW_VER_NEGATIVE = 0 x0008;//自下向上显示窗口,该标记可以在迁移转变动画和滑动动画中应用。应用AW_CENTER标记时忽视该标记该标记
    private const int AW_CENTER = 0 x0010;//若应用了AW_HIDE标记,则使窗口向内重叠;不然向外扩大
    private const int AW_HIDE = 0 x10000;//隐蔽窗口
    private const int AW_ACTIVE = 0 x20000;//激活窗口,在应用了AW_HIDE标记后不要应用这个标记
    private const int AW_SLIDE = 0 x40000;//应用滑动类型动画结果,默认为迁移转变动画类型,当应用AW_CENTER标记时,这个标记就被忽视
    private const int AW_BLEND = 0 x80000;//应用淡入淡出结果
     
    private void Form1_Load(object sender, EventArgs e)
    {
        int x = Screen.PrimaryScreen.WorkingArea.Right - this.Width;
        int y = Screen.PrimaryScreen.WorkingArea.Bottom - this.Height;
        this.Location = new Point(x, y);//设置窗体在屏幕右下角显示
        AnimateWindow(this.Handle, 1000, AW_SLIDE | AW_ACTIVE | AW_VER_NEGATIVE);
    }
     
    private void Form1_FormClosing(object sender, FormClosingEventArgs e)
    {
        AnimateWindow(this.Handle, 1000, AW_BLEND | AW_HIDE);
    }
  • 相关阅读:
    2015北京网络赛 Couple Trees 倍增算法
    POJ 1330 Nearest Common Ancestors 倍增算法的LCA
    2015北京网络赛 G Boxes BFS+打表
    Codeforces Round#320 Div2 解题报告
    HDU 5446 Unknown Treasure Lucas+中国剩余定理+按位乘
    codeforces #329 div 2 B. Anton and Lines(几何)
    codeforces #329 div 2 A. 2Char (暴力)
    hdu 1394 Minimum Inversion Number (树状数组 逆序对)
    hdu 1754 I Hate It (线段树)
    codeforces 589 G
  • 原文地址:https://www.cnblogs.com/liaocheng/p/4547046.html
Copyright © 2020-2023  润新知