求助:datagridview做出闪烁效果 比如,当前这一秒每行的背景色是红色;下一秒变成白色,如此循环,谢谢! 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 public Form1() { InitializeComponent(); dataGridView1.BackgroundColor = Color.White; }private void timer1_Tick(object sender, EventArgs e) { if (dataGridView1.BackgroundColor == Color.White) dataGridView1.BackgroundColor = Color.Green; else dataGridView1.BackgroundColor = Color.White; } private void button1_Click(object sender, EventArgs e) { timer1.Enabled = true; } 貌似这个更符合你得要求private void timer1_Tick(object sender, EventArgs e) { if (dataGridView1.RowsDefaultCellStyle.BackColor == Color.White) dataGridView1.RowsDefaultCellStyle.BackColor = Color.Red; else dataGridView1.RowsDefaultCellStyle.BackColor = Color.White; } private void timer1_Tick(object sender, EventArgs e) {this.dataGridView1.RowsDefaultCellStyle.BackColor =(dataGridView1.RowsDefaultCellStyle.BackColor == Color.Red?Color.White: Color.Red;this.dataGridView1.AlternatingRowsDefaultCellStyle.BackColor =Color.Red;} 帮帮忙吧! 关于多线程访问COM接口的问题 c#可以写DLL吗? C# WinForm,窗口总是可以自由拉大拉小,最大化按扭没有了。 字符串判断 急请教:文本框的内容改变的事件 文件删除问题 怎样截获浏览器发出得http请求? 请哪位老大发个C#实时读COM口的例子 请教微软的技术专家。一个完全不合理的问题!C#足够变态的问题! 不支持配置节的加密。。怎么办啊。。。 做视频,图像方面的编程,用C#还是什么语言好呢?
{
InitializeComponent(); dataGridView1.BackgroundColor = Color.White;
}private void timer1_Tick(object sender, EventArgs e)
{
if (dataGridView1.BackgroundColor == Color.White)
dataGridView1.BackgroundColor = Color.Green;
else
dataGridView1.BackgroundColor = Color.White;
} private void button1_Click(object sender, EventArgs e)
{
timer1.Enabled = true;
}
private void timer1_Tick(object sender, EventArgs e)
{
if (dataGridView1.RowsDefaultCellStyle.BackColor == Color.White)
dataGridView1.RowsDefaultCellStyle.BackColor = Color.Red;
else
dataGridView1.RowsDefaultCellStyle.BackColor = Color.White;
}
{
this.dataGridView1.RowsDefaultCellStyle.BackColor =(dataGridView1.RowsDefaultCellStyle.BackColor == Color.Red?Color.White:
Color.Red;
this.dataGridView1.AlternatingRowsDefaultCellStyle.BackColor =Color.Red;
}