问题描述
某些应用程序为用户提供了一种改变其肤色的方法.我并不是说要创建一个可换肤的应用程序.我的意思是类似于Windows aero主题,您可以在其中更改颜色...
我想做的是提供具有标准颜色的颜色托盘,并提供选择基本托盘中未提供的阴影的选项...
另一个例子是Paint应用程序.提供的基本颜色很少,以小方块显示.您可以选择其中之一,也可以选择一个显示两窗格窗口的选项,该窗口显示所有可能的阴影,并使用鼠标选择所需的颜色阴影...
这是关于什么的:
这是为我的应用程序的用户提供一种简单的方法,可以通过使用纯色或选择图像来更改表单,按钮和文本的背景颜色(图像或颜色选择仅适用于表单背景.按钮和标签允许颜色只能更改且不更改图像),并设置任意级别的透明度(1 =最高透明度,255 =完全不透明,对于100%透明度,不设置0).
我正在使用Visual Studio,C#和Windows OS.
certain apps provide users with a way of changing its skin color. I dont mean creating a skinable app. what i mean is similar to the windows aero theme where you can change the color...
what i want to do is provide a color pallet with standard colors and an option to select shades not provided in the basic pallet...
another example of this is, say, the paint app. You are provided with few basic colors shown in little squares. You can either select one of them or select an option that displays a 2-paned window which displays all the possible shades and you use your mouse to select the shade of color you want...
what this is about:
This is to provide the user of my app a simple way of changing the background color of the forms, buttons and text by either using a solid color or selecting an image(image or color choice is only for form background. buttons and labels allow color change only and no image) as well as set any level of transparency (1=highest transparency,255=fully opaque, no 0 for 100% transparency).
I am using visual studio, C# and windows OS.
推荐答案
ColorDialog cd = new ColorDialog();
if (cd.ShowDialog() == DialogResult.OK)
{
BackColor = cd.Color;
}
这篇关于提供用于更改背景颜色的颜色托盘的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!