c#如何使TEXTBOX背景颜色变灰?

编译器错误消息: CS0234:
命名空间“System”中不存在类型或命名空间名称“Color”(是否缺少程序集引用?)

源错误:

行 548: txtEquFaDate1.Enabled =true;
行 549: txtEquFaDate2.Enabled =true;
行 550: txtEquFaDate1.BackColor = System.Color.gray;
行 551: txtEquFaDate2.BackColor = System.Color.gray;
行 552: }

请问你的意思是,textbox背景变灰后还能编辑是吗?
应该是txtEquFaDate1.BackColor = System.Drawing.Color.gray;追问

错误提示:
CS0117: “System.Drawing.Color”并不包含“white”的定义

追答

c# 区分大小写的,应该是White

温馨提示:答案为网友推荐,仅供参考
相似回答