我想实现窗口的缩变,当点击一个按钮的时候,窗口由小变大并且有点淡入淡出的感觉。就像vista系统的效果一样。请各位大侠帮忙了!
解决方案 »
- 【100分】【WMI】【诡异】换了一种方式就拒绝访问?!
- vs2005如何添加Excel Workbook等模板
- 关于擦除背景的问题
- 求一简单正则表达式:
- datagrid有没有属性设置,可以将为负数的值,显示为红色.当然哪一行哪一列的值为负数,事先并不知道
- 我学不走了,请帮忙!!!
- 我想将WINFROM下的DataGrid的样式改一下,写了一此代码,老是出错,请高手指教。。
- 怎么样才能调出BUTTONXP这个控件
- 高分:如何获得一个数据集其中一个表的字段,及其内容?不胜感激!
- 怎样读取其他窗体内textBox内容?
- 急需一个用于asp.net + c# 开发的管理框架,有报酬。
- 高分求助关于控件的重复使用问题
[DllImport("user32.dll")]
public static extern bool DrawAnimatedRects(
IntPtr hwnd,
int Ani,
ref RECT from,
ref RECT to);具体使用请参考msdn 相关api说明
public static extern bool DrawAnimatedRects(
IntPtr hwnd,
int Ani,
ref Rectangle from,
ref Rectangle to);
[DllImport("user32.dll")]
static extern bool AnimateWindow(IntPtr hwnd, uint dwTime, uint dwFlags);
public Form1()
{
InitializeComponent();
} private void Form1_Load(object sender, EventArgs e)
{
Rectangle ee=new Rectangle(this.Location.X,this.Location.Y,this.Width,this.Height);
Rectangle s=new Rectangle(this.Location.X+this.Width/2,this.Location.Y+this.Height/2,0,0);
//DrawAnimatedRects(Handle, 0x3, ref s, ref ee); 动态效果,速度比较快
AnimateWindow(Handle, 1000, 0x0010); //这个api速度可以调,中间那个1000为1000毫秒 }
}