标题:c#计时器问题???
取消只看楼主
冲冲走过
Rank: 2
等 级:论坛游民
帖 子:69
专家分:72
注 册:2011-10-2
结帖率:91.67%
已结贴  问题点数:4 回复次数:0 
c#计时器问题???
private void Form1_Load(object sender, EventArgs e)
        {
            timer1.Start();

            timer2.Start();
        }
        string T = "苟利国家生死以," + "\r\n" + "岂因祸福避趋之。"; int i = 0;
        private void timer1_Tick(object sender, EventArgs e)
        {
            string s;
            s = T.Substring(i, 1);
            textBox1.Text += s;
            label1.Text = T.Length + "----" + i.ToString();
            textBox1.SelectionStart = textBox1.TextLength;
            i++;
            if (i > T.Length-1)
            {
                i = 0;
                s = "";
                textBox1.Text = "";
               
                timer1.Stop();
                timer2.Start();

            
            }





        }

        private void timer2_Tick(object sender, EventArgs e)
        {

            timer2.Stop();
            timer1.Start();

      

        }

    }
}

 结果是最后一个句号显示不出来,求高手解决????!!!

 
搜索更多相关主题的帖子: 计时器 private 
2011-11-17 13:56



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-355478-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.052265 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved