使用AnimateWindow制作淡入淡出效果的窗体命名空间:
using System.Runtime.InteropServices;
API函数:
[DllImport("user32")]
private static extern bool AnimateWindow(IntPtr whnd,int dwtime,int dwflag);
//dwflag的取值如下
public const Int32 AW_HOR_POSITIVE = 0x00000001;
//从左到右显示
public const Int32 AW_HOR_NEGATIVE = 0x00000002;
//从右到左显示
public const Int32 AW_VER_POSITIVE = 0x00000004;
//从上到下显示
public const Int32 AW_VER_NEGATIVE = 0x00000008;
............