using System.Runtime.InteropServices;private void Form2_Load(object sender, System.EventArgs e)
{
Win32.AnimateWindow(this.Handle,500, 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
);
}
{
Win32.AnimateWindow(this.Handle,500, 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
);
}
解决方案 »
- infragistics 系列控件中 UltraListView 如何右键选择项?
- DataGridView用LinqToSQL作数据源时的增删改
- GetType问题,如何动态获得OldDbConnection的Type
- 寻找数字转英文的算法?
- 如何使一个应用程序起动之后,一直运行,相当于让程序自动触发,直到人为的关闭?
- 高手门帮我看看这个函数怎么错了。取日期的
- datagrid的打印问题,在线等
- 请教:字符串连结问题。
- dataview 中关于用RowFilter属性来筛选行的问题
- 在sql server中多条sql命令可以用分号隔开,access怎么做?
- 如何修改注册表的键的默认键值?
- 如何获得线程类的句柄? 急
for(double d=0d; d< 1.0d; d+=0.1d)
{
System.Threading.Thread.Sleep(50);
Application.DoEvents();
this.Opacity=d;
this.Refresh();
}