个人代码库の设置窗体效果AnimateWindow

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
}

}

 

posted @ 2010-05-09 17:13  Asion Tang  阅读(350)  评论(0编辑  收藏  举报