使用系统颜色时出现问题 [英] Problem working with system color

查看:60
本文介绍了使用系统颜色时出现问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述




我想使用用户配色方案来设置表单的颜色。


我现在必须使用。 System.Drawing.SystemColors,但其颜色是其他应用程序中使用的表单背景的颜色。


最后我想做的一切


form1.backcolor = system.whatever.color


这可能,怎么样?

解决方案

*" AussieRules" <所以***** @ nowhere.com> scripsit:

我想使用用户配色方案来设置表单的颜色。

我现在必须使用。 System.Drawing.SystemColors,但是哪种颜色是其他应用程序中使用的表单背景的颜色。

最后我想做的就是
form1.backcolor = system.whatever.color




''SystemColors.Control''。


-

Herfried K. Wagner

MVP·VB Classic,VB.NET

< http://www.mvps.org/dotnet>


" AussieRules" <所以***** @ nowhere.com> schrieb


我正在尝试使用用户设置的配色方案(橄榄绿,银色,默认)。

使用时systemcolors.window我得到的表单颜色是白色,
不是office03使用的应用程序与
主题链接的颜色

希望有意义..




哦,我明白了。您想要应用视觉样式。在Framework 1.1中,您可以使用
调用System.Windows.Forms.Application.EnableVisualStyle。在Framework 1.0

中,您必须在application.config文件中添加一些行。搜索此群组

代表视觉风格你会找到一些提示。

-

Armin


在星期二, 2003年10月21日23:00:58 +0100,AussieRules

< so ***** @ nowhere.com>写道:



我想使用用户配色方案来设置表单的颜色。

我现在我必须使用。 System.Drawing.SystemColors,但是哪种颜色是其他应用程序中使用的表单背景的颜色。

最后我想做的就是
form1.backcolor = system.whatever.color

这可能,怎么样?




System.Drawing.SystemColors.Control是正常的表格背景。

System.Drawing.SystemColors.Window是文本框内的白色位。


Hi,

I want to use the user color scheme to set the color of my forms.

I now I have to use the. System.Drawing.SystemColors, but which color is the
color of a form background as used in other applications.

In the end all I want to do is

form1.backcolor = system.whatever.color

Is this possible, and how?

解决方案

* "AussieRules" <so*****@nowhere.com> scripsit:

I want to use the user color scheme to set the color of my forms.

I now I have to use the. System.Drawing.SystemColors, but which color is the
color of a form background as used in other applications.

In the end all I want to do is

form1.backcolor = system.whatever.color



''SystemColors.Control''.

--
Herfried K. Wagner
MVP · VB Classic, VB.NET
<http://www.mvps.org/dotnet>


"AussieRules" <so*****@nowhere.com> schrieb


I am trying to use the color scheme as set by the user(olive green,
silver, default).

When use the systemcolors.window I get the form color to be white,
not the color that apps like office03 uses which is linked to the
themes

Hope that makes sense..



Oh, I see. You want to apply the "visual styles". In Framework 1.1 you can
call System.Windows.Forms.Application.EnableVisualStyle s. In Framework 1.0
you have to add some lines to the application.config file. Search this group
for "visual styles" and you''ll find some hints.
--
Armin


On Tue, 21 Oct 2003 23:00:58 +0100, "AussieRules"
<so*****@nowhere.com> wrote:

Hi,

I want to use the user color scheme to set the color of my forms.

I now I have to use the. System.Drawing.SystemColors, but which color is the
color of a form background as used in other applications.

In the end all I want to do is

form1.backcolor = system.whatever.color

Is this possible, and how?



System.Drawing.SystemColors.Control is normal Form background.
System.Drawing.SystemColors.Window is the white bit inside a text box.


这篇关于使用系统颜色时出现问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆