如何在Windows窗体中使用backColor? [英] how to chan backColor in windows form?
本文介绍了如何在Windows窗体中使用backColor?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
HI GUYS。
我想在按下按钮后改变表格颜色。
表格属性>> backColor我们可以选择这种颜色:ScrollBar。
但我不能在这段代码中使用这种颜色:
this.BackColor = Color.White;
如何使用代码将表单backColor更改为ScrollBar?
HI GUYS.
I want to change form backcolor whent pressing a button.
in form properties>>backColor we can choice this color:ScrollBar.
but i cant use this color in this code:
this.BackColor = Color.White;
how can i change form backColor to ScrollBar with Code?
推荐答案
是的,如果您更全面地阅读文档,则可以。这是System.Drawing.SystemColors
:System.Drawing.SystemColors.ScrollBar
,ButtonFace
,ControlText
...请参阅:
http://msdn.microsoft.com/en-us/library/system.drawing.systemcolors.aspx [ ^ ]。
-SA
Yes, you can, if you read documentation more thoroughly. This isSystem.Drawing.SystemColors
:System.Drawing.SystemColors.ScrollBar
,ButtonFace
,ControlText
… Please see:
http://msdn.microsoft.com/en-us/library/system.drawing.systemcolors.aspx[^].
—SA
this.BackColor = System.Drawing.SystemColors.ScrollBar;
这篇关于如何在Windows窗体中使用backColor?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文