如何实现Winform的不同弹出效果呢?例如淡入淡出等等。
类似于Visita效果, 或者大家知道哪里相关的或者类似的文档,或者例子
类似于Visita效果, 或者大家知道哪里相关的或者类似的文档,或者例子
解决方案 »
- 如何使button控件可以让用户自已拖动摆放的位置?
- HTML里面的Select标签设置默认值
- C#获取Sybase存储过程的Return值出错!
- DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN 导致javascript 不执行
- 如何查找xml
- 显示目录下的文件及文件夹
- 一个很奇怪的问题?????
- 怎样直接在datagrid中加入一行进数据库?我要动态的改变datasource属性的
- 高手请进
- timeout时间已到,如何处理
- C#调VC DLL时 Void* abc 类形怎么对应
- 关于.net中倒入wsdl的问题,请各位哥哥姐姐帮帮忙!俺是新手
判断透明度,为0时,窗体关闭.
{
this.Opacity = 0;
while (this.Opacity < 1)
{
this.Opacity += 0.1;
Application.DoEvents();
System.Threading.Thread.Sleep(30);
}
} private void Form1_FormClosing(object sender, FormClosingEventArgs e)
{
while (this.Opacity > 0)
{
this.Opacity -= 0.1;
Application.DoEvents();
System.Threading.Thread.Sleep(30);
}
}
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.Runtime.InteropServices;
namespace WindowsApplication1
{ public partial class Form1 : 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;
[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
);
public Form1()
{
InitializeComponent();
} private void Form1_Load(object sender, EventArgs e)
{
AnimateWindow(this.Handle, 500, AW_HOR_NEGATIVE | AW_VER_NEGATIVE | AW_HOR_NEGATIVE );
}
}
}