就是点击之后改变的颜色,怎么实现
解决方案 »
- 获取tif文件中的指定页
- gridView_Coupon.FocusedRowHandle = -Int32.MaxValue;求大侠告知
- 关于正则表达式空格的问题,在线等~~~
- 有没有更好的语音朗读啊
- <base target='_self'/>无效
- Winform中的TreeView,如何在处理了Keydown事件中的Keys.Left后,屏蔽掉TreeView本身的Keys.Left事件?
- 这种POST请求如何在C#中处理,谢谢
- 在web应用程序中用水晶报表导出excel格式,为什么不显示表格线,
- 问两个字符串处理的问题的问题
- C#Winform数据导出报错
- 请问如何获取枚举所继承的类型?
- 求助c#winform程序!!
//设置button的背景颜色
button.UseVisualStyleBackColor=false
button.BackColor = System.Drawing.Color.Red
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
namespace WindowsApplication1
{
public partial class Form1 : Form
{
Boolean isTrue = true;
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
if(isTrue)
{
this.button1.Text = "在线";
this.button1.ForeColor = Color.Blue;
}
else
{
this.button1.Text = "离线";
this.button1.ForeColor = Color.Red;
}
isTrue = !isTrue;
}
}
}
{
button1.BackColor =Color.FromArgb(255,219,73) ;
}
button.UseVisualStyleBackColor=false
button.BackColor = System.Drawing.Color.Red