挑战? [英] challenge?

查看:78
本文介绍了挑战?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这对我来说真的是一个挑战。


我在VB.NET 2003中开发的应用程序在海船上运行,

应用程序有很多屏幕和控件。在晚上的海上船上,只有

暗青色(或类似)颜色必须在显示器上使用(很像雷达

显示)否则船长将被蒙蔽明亮的颜色。


在晚上,用户点击按钮将应用程序转换为

夜间模式。我不想通过所有对象(超过1000)来改变每种颜色,我想也许我可以更改

Windows或VB的调色板,他们正在使用的计算机被指定只运行我的

应用程序,所以它不会影响其他应用程序。


有没有办法我可以更改例如

SystemColors.Control.Yellow在夜间模式下对SystemColors.Control.DarkCyan的定义

并在日模式下恢复正常?

谢谢提前。

this one is really a challenge to me.

the application i developed in VB.NET 2003 runs on marine boat, the
application has many screens and controls. On a marine boat at night, only
dark cyan (or similar) color must be used on display (much like the radar
display) otherwise the captain will be blinded by the bright colors.

When at night, the user clicks on a button to turn the application into
night mode. I do not want to go through all the objects (over 1000) to
change each color, I am thinking that maybe I can change the palette of
Windows or VB, the computer they are using is designated to run my
application only, so it will not affect other application.

Is there a way i can change for example the definition of
SystemColors.Control.Yellow to SystemColors.Control.DarkCyan at night mode
and return to normal on day mode?
Thanks in advance.

推荐答案



anthony写道:

anthony wrote:
这个真的是一个挑战我在VB.NET 2003中开发的应用程序在海船上运行,
应用程序有很多屏幕和控件。在
晚上的海洋船上,只能在显示器上使用深青色(或类似的)颜色(很像
雷达显示器),否则船长会被鲜艳的颜色蒙蔽。

晚上,用户点击按钮将应用程序
变为夜间模式。我不想通过所有对象(超过1000)
来改变每种颜色,我想也许我可以更改Windows或VB的调色板
,他们使用的计算机被指定为只运行我的
应用程序,所以它不会影响其他应用程序。

有没有办法可以改变例如SystemColors.Control.Yellow到SystemColors.Control的定义.DarkCyan在晚上
模式并在白天模式下恢复正常?
this one is really a challenge to me.

the application i developed in VB.NET 2003 runs on marine boat, the
application has many screens and controls. On a marine boat at night, only dark cyan (or similar) color must be used on display (much like the radar display) otherwise the captain will be blinded by the bright colors.

When at night, the user clicks on a button to turn the application into night mode. I do not want to go through all the objects (over 1000) to change each color, I am thinking that maybe I can change the palette of Windows or VB, the computer they are using is designated to run my
application only, so it will not affect other application.

Is there a way i can change for example the definition of
SystemColors.Control.Yellow to SystemColors.Control.DarkCyan at night mode and return to normal on day mode?




鉴于您的应用程序仅使用PC,听起来最简单的方式

将确保所有控件都使用SystemColors,然后更改

* global * Windows配色方案(你知道,你在哪里设置什么颜色

标题栏和东西是)。我只是做了一个快速测试,并且当Windows

配色方案发生变化时,在Win2k上运行的VB.NET 2002

应用会自动*更改颜色*所以你应该没问题。


现在问题变成了如何更改Windows设置?我怀疑

它将涉及P / Invoke''的API,但我不希望它是特别困难的b / b
。您可以自己找到,或者您想要更多?


-

Larry Lard

回复团体请



Given that your app has sole use of the PC, sounds like the easiest way
would be to make sure all your controls use SystemColors, then change
the *global* Windows colour scheme (you know, where you set what colour
title bars and stuff are). I just did a quick test and a VB.NET 2002
app running on Win2k changes colours *automatically* when the Windows
colour scheme changes, so you should be alright.

Now the question becomes how to change that Windows setting? I suspect
it will involve P/Invoke''ing the API, but I don''t expect it to be
particularly difficult. You can find this yourself, or you want more?

--
Larry Lard
Replies to group please




Larry Lard写道:

Larry Lard wrote:
anthony写道:
anthony wrote:
这一个是对我来说真的是一个挑战。

我在VB.NET 2003中开发的应用程序在海船上运行,
应用程序有很多屏幕和控件。在晚上的海上船上,只能在显示器上使用
this one is really a challenge to me.

the application i developed in VB.NET 2003 runs on marine boat, the
application has many screens and controls. On a marine boat at night, only
深青色(或类似)颜色(很像
dark cyan (or similar) color must be used on display (much like the


雷达

显示否则船长会被明亮的
颜色蒙蔽。
在晚上,用户点击按钮将应用程序
display) otherwise the captain will be blinded by the bright colors.
When at night, the user clicks on a button to turn the application


转换为

夜间模式。我不想通过所有对象(通过
night mode. I do not want to go through all the objects (over



1000)来


1000) to

改变每种颜色,我想也许我可以更改
change each color, I am thinking that maybe I can change the
Windows或VB的

palette of


调色板,他们使用的计算机被指定仅运行我的
应用程序,因此不会影响其他应用程序。 br />
有没有办法可以改变
SystemColors.Control.Yellow到SystemColors.Control.DarkCyan的定义

Windows or VB, the computer they are using is designated to run my
application only, so it will not affect other application.

Is there a way i can change for example the definition of
SystemColors.Control.Yellow to SystemColors.Control.DarkCyan at


night mode

night mode

并在白天模式下恢复正常?
鉴于您的应用程序只使用PC,听起来最简单的
and return to normal on day mode?
Given that your app has sole use of the PC, sounds like the easiest



方式将确保您的所有控件使用SystemColors,然后改变* global * Windows配色方案(你知道,你在哪里设置
颜色标题栏和东西)。我只是做了一个快速测试,当Windows
配色方案发生变化时,在Win2k上运行的VB.NET 2002
应用会自动*改变颜色*所以你应该没问题。

现在的问题是如何改变Windows设置?我
怀疑它将涉及P / Invoke''的API,但我不认为它特别困难。你可以自己找到这个,或者你想要更多吗?


way would be to make sure all your controls use SystemColors, then change
the *global* Windows colour scheme (you know, where you set what colour title bars and stuff are). I just did a quick test and a VB.NET 2002
app running on Win2k changes colours *automatically* when the Windows
colour scheme changes, so you should be alright.

Now the question becomes how to change that Windows setting? I suspect it will involve P/Invoke''ing the API, but I don''t expect it to be
particularly difficult. You can find this yourself, or you want more?




[回复自己]

(它是SetSysColor但是... )

实际上,为什么重新发明轮子?只要确保你的应用只使用

SystemColor'的颜色,那么用户就可以使用控制面板

|显示在晚上切换到夜间计划,并且(因为我建立了
)你的应用程序将自动切换。


-

Larry Lard

回复团体请



[replying to self]
(it''s SetSysColor but...)
Actually, why re-invent the wheel? Just make sure your app uses only
SystemColor''s for its colours, then the user can just use Control Panel
| Display to switch to a night-time scheme at night, and (as I have
established) your app will switch automatically.

--
Larry Lard
Replies to group please


" anthony" <一个******* @ controlengineer.com>写在

news:u
"anthony" <an*******@controlengineer.com> wrote in
news:u


这篇关于挑战?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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