首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > .NET > C# >

调用AnimateWindow步骤,是不是属于调用Windows API

2012-10-29 
调用AnimateWindow方法,是不是属于调用Windows API?C# code public partial class Formdonghua : Form{//

调用AnimateWindow方法,是不是属于调用Windows API?

C# code
 public partial class Formdonghua : Form    {        //动画窗体调用,关闭时将向上移出屏幕        [System.Runtime.InteropServices.DllImport("user32")]        private static extern bool AnimateWindow(IntPtr hwnd, int dwTime, int dwFlags);        const int AW_HOR_POSITIVE = 0x0001;        const int AW_HOR_NEGATIVE = 0x0002;        const int AW_VER_POSITIVE = 0x0004;        const int AW_VER_NEGATIVE = 0x0008;        const int AW_CENTER = 0x0010;        const int AW_HIDE = 0x10000;        const int AW_ACTIVATE = 0x20000;        const int AW_SLIDE = 0x40000;        const int AW_BLEND = 0x80000;        //…………………………………………………………        public Formdonghua()        {            InitializeComponent();        }        private void Formdonghua_Load(object sender, EventArgs e)        {            //动画由小渐大,现在取消            AnimateWindow(this.Handle, 1000, AW_CENTER | AW_ACTIVATE);            //主界面渐变设置            this.jianbian.Enabled = true;//让jianbian的timer值有效            this.Opacity = 0;            //………………………………………………        }        private void jianbian_Tick(object sender, EventArgs e)        {            //让背景由0变到1            if (this.Opacity < 1)            {                this.Opacity = this.Opacity + 0.05;            }            else            {                this.jianbian.Enabled = false;            }        }        private void Formdonghua_FormClosing(object sender, FormClosingEventArgs e)        {//关闭时动画            AnimateWindow(this.Handle, 1000, AW_SLIDE | AW_HIDE | AW_VER_NEGATIVE);        }    }


[解决办法]
Win32 API


http://topic.csdn.net/u/20120925/01/e9606dce-3f22-4b2a-b2dd-d9b8e3521bc6.html?67920
[解决办法]

回复内容太短

热点排行