C#淡出淡入窗体
来源:互联网 发布:seed软件下载 编辑:程序博客网 时间:2024/04/30 15:26
using System.Runtime.InteropServices;
public class Win32
...{
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; // 从下到上打开窗口
public const Int32 AW_CENTER = 0x00000010;
public const Int32 AW_HIDE = 0x00010000; // 在窗体卸载时若想使用本函数就得加上此常量
public const Int32 AW_ACTIVATE = 0x00020000; //在窗体通过本函数打开后,默认情况下会失去焦点,除非加上本常量
public const Int32 AW_SLIDE = 0x00040000;
public const Int32 AW_BLEND = 0x00080000; // 淡入淡出效果
[DllImport("user32.dll", CharSet = CharSet.Auto)]
public static extern bool AnimateWindow(
IntPtr hwnd, // handle to window
int dwTime, // duration of animation
int dwFlags // animation type
);
}
/**//*淡入窗体*/
private void Form_Load(object sender, EventArgs e)
...{
Win32.AnimateWindow(this.Handle, 2000, Win32.AW_BLEND);
}
/**//*淡出窗体*/
private void Form_FormClosing(object sender, FormClosingEventArgs e)
...{
Win32.AnimateWindow(this.Handle, 2000, Win32.AW_SLIDE | Win32.AW_HIDE | Win32.AW_BLEND);
}
public class Win32
...{
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; // 从下到上打开窗口
public const Int32 AW_CENTER = 0x00000010;
public const Int32 AW_HIDE = 0x00010000; // 在窗体卸载时若想使用本函数就得加上此常量
public const Int32 AW_ACTIVATE = 0x00020000; //在窗体通过本函数打开后,默认情况下会失去焦点,除非加上本常量
public const Int32 AW_SLIDE = 0x00040000;
public const Int32 AW_BLEND = 0x00080000; // 淡入淡出效果
[DllImport("user32.dll", CharSet = CharSet.Auto)]
public static extern bool AnimateWindow(
IntPtr hwnd, // handle to window
int dwTime, // duration of animation
int dwFlags // animation type
);
}
/**//*淡入窗体*/
private void Form_Load(object sender, EventArgs e)
...{
Win32.AnimateWindow(this.Handle, 2000, Win32.AW_BLEND);
}
/**//*淡出窗体*/
private void Form_FormClosing(object sender, FormClosingEventArgs e)
...{
Win32.AnimateWindow(this.Handle, 2000, Win32.AW_SLIDE | Win32.AW_HIDE | Win32.AW_BLEND);
}
- C#淡出淡入窗体
- C#淡出淡入窗体
- C#实现窗体的淡入淡出效果
- C#窗体实现淡入淡出效果
- C# 实现窗体的淡入淡出效果
- c#软件窗体的淡入淡出
- 淡出淡入窗体
- 窗体淡入淡出效果
- 窗体的淡入淡出
- 窗体淡入淡出效果
- 使用C#实现Form窗体的淡入淡出效果
- C#淡入淡出
- 窗体的淡入淡出效果
- VB实现窗体淡入淡出
- 窗体淡入淡出(2)
- vc 窗体淡入淡出 效果
- c#有关winform的两个代码片段(多线程操作窗体控件与窗体淡入淡出效果)
- 为窗体增加淡入淡出效果
- java使用jacod
- 3G奥运前发牌已来不及 TD市场蓄势三强鼎立
- Java学习从入门到精通(转载)
- sharepoint 一个有用的方法SPSecurity.RunWithElevatedPrivileges(delegate(){})
- 2008最新绕口令(不看悔死你)
- C#淡出淡入窗体
- Visual studio 2005 缓存技术助E8.Net工作流2008 经历巨大处理能力挑战。
- 用Windows Live Writer写CSDN BLOG
- 字节颠倒用什么方法最好?
- 情人节祝福语精选
- Starting Struts2摘抄(2)
- [散文]芒果女人(作者:毕淑敏)
- 国内首家网上蔬菜市场年交易额达216亿元
- jvm内存参数设置