日期:2014-05-20  浏览次数:20717 次

做一个在屏幕飞过的文本效果,为什么闪得厉害,求高手指点好方法
using   System;
using   System.Collections.Generic;
using   System.ComponentModel;
using   System.Data;
using   System.Drawing;
using   System.Text;
using   System.Windows.Forms;
using   System.Threading;

namespace   WindowsApplication9
{
        public   partial   class   Form1   :   Form
        {
                public   Form1()
                {
                        InitializeComponent();
                }
                private   void   Form1_Load(object   sender,   EventArgs   e)
                {

                }                              
                private   void   button1_Click(object   sender,   EventArgs   e)
                {
                        Random   ran   =   new   Random();
                        int   sjs   =   ran.Next(1,   260);
                        for   (int   i   =   1;   i   <   30;   i++)
                        {
                                //panel1.Controls.Clear();
                                Label   hj   =   new   Label();
                                hj.Name   =   "hj "   +   i;
                                hj.Text   =   "2wqwer ";
                                hj.Font   =   button1.Font;
                                hj.Location   =   new   System.Drawing.Point(10   *   i,   sjs);
                                panel1.Controls.Add(hj);
                                Application.DoEvents();
                                Thread.Sleep(40);
                          }                              
                        Button   hj1   =   new   Button();