我想让窗体从右向左逐渐显示出来 应该怎么做?
不用GDI画 有别的方法吗?

解决方案 »

  1.   

    using System;
    using System.Collections.Generic;
    using System.Windows.Forms;namespace WindowsApplication4
    {
        static class Program
        {
            /// <summary>
            /// 应用程序的主入口点。
            /// </summary>
            [STAThread]
            static void Main()
            {
                Application.EnableVisualStyles();
                Application.SetCompatibleTextRenderingDefault(false);
                Form1 fm = new Form1();
                fm.Activated += new EventHandler(fm_Activated);
                Application.Run(fm);
            }        static void fm_Activated(object sender, EventArgs e)
            {
                Form1 fm=(Form1)sender;
                fm.Left = Screen.PrimaryScreen.Bounds.Width;
                while (fm.Left > 0)
                {
                    fm.Left-=10;
                }
            }
        }
    }
      

  2.   

    我不是要移动窗体,loacation 是不能变的。
    我想要一个逐渐显示的过程。
      

  3.   

    TIMER配合一个OPACITY,加一个循环控制方位和OPACITY的值,LZ是不是要这个效果?
      

  4.   

    逐渐显示?什么意思?由小变大?那就设置Size啊
      

  5.   

    设置size 没问题 但是方向有问题!
    让宽度逐渐变大 它是从左向右显示
    我现在是想从右向左作出这个效果
    不是透明度的问题 
      

  6.   

    using System;
    using System.Collections.Generic;
    using System.Windows.Forms;namespace WindowsApplication4
    {
        static class Program
        {
            /// <summary>
            /// 应用程序的主入口点。
            /// </summary>
            [STAThread]
            static void Main()
            {
                Application.EnableVisualStyles();
                Application.SetCompatibleTextRenderingDefault(false);
                Form1 fm = new Form1();
                fm.Activated += new EventHandler(fm_Activated);
                Application.Run(fm);
            }        static void fm_Activated(object sender, EventArgs e)
            {
                int StepCount = 100;
                int StepX, StepY;            Form1 fm=(Form1)sender;
                fm.Width = 0;
                fm.Height = 0;
                fm.Top = 0;
                StepX = Screen.PrimaryScreen.Bounds.Width / StepCount;
                StepY = Screen.PrimaryScreen.Bounds.Height / StepCount;            while (fm.Left > 0)
                {
                    fm.Width += StepX;
                    fm.Height += StepY;
                    fm.Left = Screen.PrimaryScreen.Bounds.Width - fm.Width;
                }
            }
        }
    }弱弱的问一句,楼主是程序员么?