怎样在里面显示变化的数字,1-9

解决方案 »

  1.   

            private void Form1_Load(object sender, EventArgs e)
            {
                this.richTextBox1.Text = "在这后面显示数字: ";
                this.timer1.Interval = 1000;
                this.timer1.Enabled = true;
            }        private int num = 0;
            private void timer1_Tick(object sender, EventArgs e)
            {
                if (num == 9) num = 0; else num++;
                this.richTextBox1.SelectionStart = 10;
                this.richTextBox1.SelectionLength = 1;
                this.richTextBox1.SelectionColor = Color.Red;
                this.richTextBox1.SelectedText = num.ToString();
            }
      

  2.   

    不是很明白楼主意思,如果只是不停变化数据,可以结合Timer或使用随机函数。