473,324 Members | 2,313 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,324 software developers and data experts.

Control colors

Does anyone know an algorithm to create the correct
border colors and field color for a control based on its
background color? For example, a checkbox has a
background color, the checkboxes border color, and the
checkbox inner color; all based on the background color.

Thanks
Jul 19 '05 #1
2 1623
Kelvin,
Does anyone know an algorithm to create the correct
border colors and field color for a control based on its
background color?


Check out the ControlPaint class and its Dark, DarkDark, Light and
LightLight methods.

Mattias

--
Mattias Sjögren [MVP] mattias @ mvps.org
http://www.msjogren.net/dotnet/
Please reply only to the newsgroup.
Jul 19 '05 #2
Thanks!
-----Original Message-----
Kelvin,
Does anyone know an algorithm to create the correct
border colors and field color for a control based on its background color?
Check out the ControlPaint class and its Dark, DarkDark,

Light andLightLight methods.

Mattias

--
Mattias Sjögren [MVP] mattias @ mvps.org
http://www.msjogren.net/dotnet/
Please reply only to the newsgroup.
.

Jul 19 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: ourspt | last post by:
Hi, We are working on a .NET (ASP.NET/VB.NET) application with SQL Server database. In our application, we are using some standard controls and some custom controls (like list boxes, text...
1
by: Dean J Garrett | last post by:
We have a browser based application that requires us to display different colors of text inside of a Textbox control. We found out the standard .net textbox control may not be able to display...
4
by: | last post by:
Please, help. I created my contol, ButtonX, which subclasses System.Forms.Windows.Button class. I am doing my own paiting, by overriding OnPaint and OnPaintBackground (without calling base...
0
by: Bryce Budd | last post by:
Hi, I have a webform which has several server controls attached. The entire form is data bound to custom objects. The collection objects are cached using the Cache object. In my use case, I...
5
by: Bernie Yaeger | last post by:
When you use xp styles Application.EnableVisualStyles() Application.DoEvents() and you change a control's flat style to 'system', you then are not able to set the control's forecolor,...
2
by: Cliff Lane | last post by:
I have an application that allows the user to select fore and back ground colors for command buttons. I use the dialog to select the colors and store the value returned in the db as a string. For...
5
by: jcrouse | last post by:
Many of you who may respond to this are somewhat familiar with my app in process (Cor). Simply, it's a form with 30 labels that is triggered from another application, with a hotkey. The labels text...
0
by: WhiteWizard | last post by:
I have built a custom control which sits on a panel. There is another panel on the form with a splitter between them. The custom control has a tab control on it, and I need to do two things: (1)...
5
by: Arpan | last post by:
In order to populate any server control with data dynamically, is it ALWAYS NECESSARY to either BIND the DataSource to that server control or call the DataBind method of that server control? For...
2
by: Xavier | last post by:
Hi, When I create a user control textbox (like "public class mytextbox : textbox") in C# and use it on another form, properties like font, colors, etc. are not inherited. Is this behavor normal...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.