• 大小: 244KB
    文件类型: .zip
    金币: 2
    下载: 0 次
    发布日期: 2024-01-28
  • 语言: 其他
  • 标签: 关闭特效  

资源简介

酷炫关闭界面效果仿酷狗你值得拥有酷炫关闭界面效果仿酷狗你值得拥有酷炫关闭界面效果仿酷狗你值得拥有酷炫关闭界面效果仿酷狗你值得拥有

资源截图

代码片段和文件信息

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.Runtime.InteropServices;
using System.Threading;

namespace CartoonForm
{
    public partial class Frm_Main : Form
    {
        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;
        static int x;
        static int y;
        static int WIDTH;
        static int HEIGHT;
        int SH;
        int SW;
        public Frm_Main()
        {
            InitializeComponent();
            //(句柄,毫秒时间,函数)
            AnimateWindow(this.Handle 100 AW_SLIDE + AW_VER_NEGATIVE);//开始窗体动画
            x = this.Location.X;//窗体左上角x坐标
            y = this.Location.Y;//窗体左上角y坐标
            WIDTH = this.Width;//得到当前窗体的宽度
            HEIGHT = this.Height;//得到当前窗体的高度
            //得到屏幕的分辨率
            SH = Screen.PrimaryScreen.Bounds.Height;
            SW = Screen.PrimaryScreen.Bounds.Width;

        }

        //重写API函数,用来执行窗体动画显示操作
        [DllImportAttribute(“user32.dll“)]
        private static extern bool AnimateWindow(IntPtr hwnd int dwTime int dwFlags);

        private void Form1_FormClosed(object sender FormClosedEventArgs e)
        {
            window();
        }
        //结束窗体时特效
        private void window()
        {

            while (this.Width > 124)
            {
                if (this.Height >= 40)
                {
                    this.Location = new System.Drawing.Point(x y += 15);//设置窗体位置
                    this.Size = new Size(this.Width this.Height -= 25);//设置窗体大小
                    this.Refresh();//重绘窗体
                }

                else
                {
                    this.Location = new System.Drawing.Point(x += 15 y);

                    if (this.Width > 123)
                    {

                        this.Size = new Size(this.Width -= 25 this.Height);
                        this.Refresh();
                        this.Opacity -= 0.04;//设置窗体透明度递减
                    }

                }
                Thread.Sleep(10);  // 线程休眠10毫秒
            }

        }


        //拖动窗体时动态获得窗体的位置
        private void Frm_Main_Move(object sender EventArgs e)
        {
            x = this.Location.X;
            y = this.Location.Y;
        }




    }
}

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2015-07-01 14:47  仿酷狗打开关闭\
     文件        4199  2015-07-01 14:44  仿酷狗打开关闭\CartoonForm.csproj
     文件         911  2011-12-06 10:37  仿酷狗打开关闭\CartoonForm.sln
     文件       25088  2011-12-06 14:33  仿酷狗打开关闭\CartoonForm.suo
     文件       48128  2015-07-01 14:47  仿酷狗打开关闭\CartoonForm.v12.suo
     文件        3079  2015-07-01 14:47  仿酷狗打开关闭\Frm_Main.cs
     文件        2642  2015-07-01 14:44  仿酷狗打开关闭\Frm_Main.designer.cs
     文件        5814  2015-07-01 14:44  仿酷狗打开关闭\Frm_Main.resx
     文件         495  2010-07-03 13:21  仿酷狗打开关闭\Program.cs
     目录           0  2015-07-01 14:44  仿酷狗打开关闭\Properties\
     文件        1354  2010-05-21 14:24  仿酷狗打开关闭\Properties\AssemblyInfo.cs
     文件        3236  2015-07-01 14:44  仿酷狗打开关闭\Properties\Resources.Designer.cs
     文件        6203  2015-07-01 14:44  仿酷狗打开关闭\Properties\Resources.resx
     文件        1109  2011-12-06 10:37  仿酷狗打开关闭\Properties\Settings.Designer.cs
     文件         249  2010-05-21 14:24  仿酷狗打开关闭\Properties\Settings.settings
     目录           0  2015-07-01 14:44  仿酷狗打开关闭\Resources\
     文件       36739  2015-07-01 14:44  仿酷狗打开关闭\Resources\degreetx.png
     目录           0  2011-12-06 10:37  仿酷狗打开关闭\bin\
     目录           0  2015-06-30 10:14  仿酷狗打开关闭\bin\Debug\
     文件       60928  2015-07-01 14:46  仿酷狗打开关闭\bin\Debug\CartoonForm.exe
     文件       30208  2015-07-01 14:46  仿酷狗打开关闭\bin\Debug\CartoonForm.pdb
     文件       14328  2010-07-03 13:21  仿酷狗打开关闭\bin\Debug\CartoonForm.vshost.exe
     文件         490  2009-06-11 05:14  仿酷狗打开关闭\bin\Debug\CartoonForm.vshost.exe.manifest
     目录           0  2015-07-01 14:47  仿酷狗打开关闭\bin\Release\
     目录           0  2011-12-06 10:36  仿酷狗打开关闭\obj\
     目录           0  2015-07-01 14:46  仿酷狗打开关闭\obj\Debug\
     文件         180  2010-05-21 14:37  仿酷狗打开关闭\obj\Debug\CartoonForm.Form1.resources
     文件         180  2015-07-01 14:44  仿酷狗打开关闭\obj\Debug\CartoonForm.Frm_Main.resources
     文件       51276  2015-07-01 14:44  仿酷狗打开关闭\obj\Debug\CartoonForm.Properties.Resources.resources
     文件        3122  2015-06-30 10:15  仿酷狗打开关闭\obj\Debug\CartoonForm.csproj.FileListAbsolute.txt
     文件         950  2015-07-01 14:44  仿酷狗打开关闭\obj\Debug\CartoonForm.csproj.GenerateResource.Cache
............此处省略11个文件信息

评论

共有 条评论

相关资源