Загрузка...

[C#] Animated application start/close

Thread in C# created by sett9 Jan 4, 2018. (bumped Oct 13, 2017) 615 views

  1. sett9
    sett9 Topic starter Jan 4, 2018 lolzteam.net/threads/506756/ 44 Aug 28, 2016
    Code

    public Form1()
    {
    InitializeComponent();
    AnimateWindow(Handle, 350, AnimateWindowFlags.AW_SLIDE | AnimateWindowFlags.AW_VER_POSITIVE);
    }

    enum AnimateWindowFlags : uint
    {
    AW_HOR_POSITIVE = 0x00000001,
    AW_HOR_NEGATIVE = 0x00000002,
    AW_VER_POSITIVE = 0x00000004,
    AW_VER_NEGATIVE = 0x00000008,
    AW_CENTER = 0x00000010,
    AW_HIDE = 0x00010000,
    AW_ACTIVATE = 0x00020000,
    AW_SLIDE = 0x00040000,
    AW_BLEND = 0x00080000
    }

    [DllImport("user32")]
    static extern bool AnimateWindow(IntPtr hwnd, int time, AnimateWindowFlags flags);

    private void Form1_FormClosing(object sender, FormClosingEventArgs e)
    {
    AnimateWindow(Handle, 350, AnimateWindowFlags.AW_SLIDE | AnimateWindowFlags.AW_VER_POSITIVE | AnimateWindowFlags.AW_HIDE);
    }

     
Loading...
Top