如何实现Winform的不同弹出效果呢?例如淡入淡出等等。
类似于Visita效果, 或者大家知道哪里相关的或者类似的文档,或者例子

解决方案 »

  1.   

    蛋入淡出   就让它的透明度慢慢的变为0,窗体随着透明度变大而变大,变小而变小.TIMER控件
    判断透明度,为0时,窗体关闭.
      

  2.   

     private void Form1_Load(object sender, EventArgs e)
            {
                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);
                }
            }
      

  3.   

    楼上兄弟给出的是淡入淡出效果吧,谢谢。有没有特殊的别的效果,类似于POWERPOINT的效果。譬如form从中间的某一点扩张,然后慢慢的到正常大小。这个怎么实现?
      

  4.   

    windows api AnimateWindow参数自己慢慢试吧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;
    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 ); 
            }        
        }
    }
      

  5.   

    如果要淡入淡出的话  用AW_CENTER|AW_BLEND就可以了
      

  6.   

    好,我单个都试试, 还有个问题,呵呵,顺便问了,我是windows xp 系统 ,在xp系统上,可以实现 visita的效果吗? 需要什么条件才能实现呢?