RICHTEXTBOX 怎样在里面显示变化的数字,1-9 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 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(); } 不是很明白楼主意思,如果只是不停变化数据,可以结合Timer或使用随机函数。 关于数组的问题, 请赐予我答案! winform中Propertygrid控件使用问题 如何将string格式颜色值转换成ForeColor形式的color 怎样用C#做一象QQ那样功能的登陆框 线程问题(WinForm界面) 基础类的复制 dataGrid如何实现固定列 邮件头解码问题 如何调用PC喇叭发出"嘀-嘀-嘀"的声音? 再线,当时给分,一个简单的问题 急问:怎样抓图制成图片 FileStream和Stream关系
{
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();
}