using System; using System.Collections.Generic; using System.Linq; using System.Runtime.InteropServices; using System.Text; namespace Azylee.WinformSkin.APIUtils { public class FormAnimateAPI { /// /// 窗体动画函数 /// /// 指定产生动画的窗口的句柄 /// 指定动画持续的时间 /// 指定动画类型,可以是一个或多个标志的组合。 /// [DllImport("user32")] public static extern bool AnimateWindow(IntPtr hwnd, int dwTime, int dwFlags); /// /// 自左向右显示窗口,该标志可以在滚动动画和滑动动画中使用。使用AW_CENTER标志时忽略该标志 /// public static int AW_HOR_POSITIVE { get { return 0x0001; } } /// /// 自右向左显示窗口,该标志可以在滚动动画和滑动动画中使用。使用AW_CENTER标志时忽略该标志 /// public static int AW_HOR_NEGATIVE { get { return 0x0002; } } /// /// 自顶向下显示窗口,该标志可以在滚动动画和滑动动画中使用。使用AW_CENTER标志时忽略该标志 /// public static int AW_VER_POSITIVE { get { return 0x0004; } } /// /// 自下向上显示窗口,该标志可以在滚动动画和滑动动画中使用。使用AW_CENTER标志时忽略该标志该标志 /// public static int AW_VER_NEGATIVE { get { return 0x0008; } } /// /// 若使用了AW_HIDE标志,则使窗口向内重叠;否则向外扩展 /// public static int AW_CENTER { get { return 0x0010; } } /// /// 隐藏窗口 /// public static int AW_HIDE { get { return 0x10000; } } /// /// 激活窗口,在使用了AW_HIDE标志后不要使用这个标志 /// public static int AW_ACTIVE { get { return 0x20000; } } /// /// 使用滑动类型动画效果,默认为滚动动画类型,当使用AW_CENTER标志时,这个标志就被忽略 /// public static int AW_SLIDE { get { return 0x40000; } } /// /// 使用淡入淡出效果 /// public static int AW_BLEND { get { return 0x80000; } } } }