using System.Runtime.InteropServices; [DllImport("user32.dll")]
extern static bool AnimateWindow(
int hwnd, // handle to window
int dwTime, // duration of animation
int dwFlags // animation type
); (下面的也许是多余了....)
各个参数的意义,下面连接.对于的常数,到相应的.h中查,然后在C#相应定义.http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winui/winui/windowsuserinterface/windowing/windows/windowreference/windowfunctions/animatewindow.asp同时参考这篇文章
http://www.vchelp.net/vchelp/zart/aniw.asp?type_id=15&class_id=1&cata_id=1&article_id=80
extern static bool AnimateWindow(
int hwnd, // handle to window
int dwTime, // duration of animation
int dwFlags // animation type
); (下面的也许是多余了....)
各个参数的意义,下面连接.对于的常数,到相应的.h中查,然后在C#相应定义.http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winui/winui/windowsuserinterface/windowing/windows/windowreference/windowfunctions/animatewindow.asp同时参考这篇文章
http://www.vchelp.net/vchelp/zart/aniw.asp?type_id=15&class_id=1&cata_id=1&article_id=80
还是有错 :(
如果你看我贴给你的那个MSDN的连接,在连接的尾部,就会看到这些常量都定义在winusr.h中. 这些.h文件都在vc/vc.net的include目录下.
(本来想让你自己找找,我还是给你贴上来吧).在C#中可以这样定义:
private const int AW_VER_NEGATIVE = 0x00000008;
/*
* AnimateWindow() Commands
*/
#define AW_HOR_POSITIVE 0x00000001
#define AW_HOR_NEGATIVE 0x00000002
#define AW_VER_POSITIVE 0x00000004
#define AW_VER_NEGATIVE 0x00000008
#define AW_CENTER 0x00000010
#define AW_HIDE 0x00010000
#define AW_ACTIVATE 0x00020000
#define AW_SLIDE 0x00040000
#define AW_BLEND 0x00080000