using System.Runtime.InteropServices;
using System;
namespace myMethod
{
public class AnimateWindows
{
#region 使用AnimateWindow(譯為:生動的表單)製作淡入淡出效果的表單
[DllImport("user32")]
//設定的效果可疊加用“|”並列。
public static extern bool AnimateWindow(IntPtr dw_handle表單控制代碼, int dw_time反應時間, int dw_flag設定效果);
//從左至右顯示
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;
//若使用了AW_HIDE標誌,則使視窗向內重疊,即收縮視窗;否則使視窗向外擴充,即展開視窗
public const Int32 AW_center縮擴 = 0x00000010;
//隱藏視窗,預設則顯示視窗,必須有AW_HIDE才能看到表單的淡出
public const Int32 AW_hide隱藏 = 0x00010000;
//啟用視窗。在使用了AW_HIDE標誌後不能使用這個標誌
public const Int32 AW_activate啟用 = 0x00020000;
//使用滑動類型。預設則為滾動動畫類型。當使用AW_CENTER標誌時,這個標誌就被忽略
public const Int32 AW_slide滑動 = 0x00040000;
//"透明度"從高到低
public const Int32 AW_blend透明漸顯 = 0x00080000;
#endregion
}
}