473,396 Members | 1,929 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,396 software developers and data experts.

Color Dialog Custom colors

Hi everyone/anyone,
I am using a button in my app that opens the color dialog, and allows
the user to select a color which changes the backcolor of a label. I
then store the color in my db as a hash value, since i found this to be
the easiest way to store it. However, i want the user to be able to
add custom colors. When they create a custom color within the dialog,
it is not saved there on returning to the dialog. I was thinking about
storing the custom colors in a file, then reading this file into an
array each time to populate the custom colors of the dialog, and then
re-writing the color values to file in order to retrieve them at a
later time. I am having problems finding an example where someone is
saving the custom colors that are created by the user. Am i going about
this the correct way? Any insight would be greatly appreciated!

Apr 12 '06 #1
2 2613
"J-Rod" <ba**********@gmail.com> wrote in message
news:11**********************@i40g2000cwc.googlegr oups.com...
Hi everyone/anyone,
I am using a button in my app that opens the color dialog, and allows
the user to select a color which changes the backcolor of a label. I
then store the color in my db as a hash value, since i found this to be
the easiest way to store it. However, i want the user to be able to
add custom colors. When they create a custom color within the dialog,
it is not saved there on returning to the dialog. I was thinking about
storing the custom colors in a file, then reading this file into an
array each time to populate the custom colors of the dialog, and then
re-writing the color values to file in order to retrieve them at a
later time. I am having problems finding an example where someone is
saving the custom colors that are created by the user. Am i going about
this the correct way? Any insight would be greatly appreciated!


Never tried in dotNet but.... here's an extensive (2 line <g>) sample.

ColorDialog.CustomColors Property
http://msdn2.microsoft.com/en-us/lib...rs(VS.80).aspx

--
Ken Halter - MS-MVP-VB (visiting from VB6 world) - http://www.vbsight.com
Please keep all discussions in the groups..
Apr 13 '06 #2
Thanks Ken. I found the same example after i posted and was able to
work something out for my situation.

Apr 14 '06 #3

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

Similar topics

4
by: Rudy | last post by:
Hello all, I'm sure there is, just can't figure it out. I have the RGB code and the color number. But the color doesn't exsist in Visual studio.net. Can I add this color to the system pallet it...
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...
36
by: AussieRules | last post by:
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...
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)...
0
by: Gancy | last post by:
Hi In my setup project I need a custom dialog box containing a drop down list box. Since this is not avaialble from standard user interface dialog boxes that visual studio supplies, I am using...
4
by: Josetta | last post by:
Can someone point me in the right direction... We have changed our logo and colors and I am redesigning numerous reports. Does anyone know a way to add custom colors whenever I start up my...
5
by: ipramod | last post by:
Hi, Is there any standard control available in C# to display color pallet or to choose the colors? If yes, can you please send a code snippet? Please let me know ASAP. Thanks, PI
5
by: randy.buchholz | last post by:
While more experienced users can pretty much tell a color from its hex, new users can't. Named colors do help with consistancy and new developers. Is it possible to create custom named color...
9
by: Gord | last post by:
In VB6, a custom dialog can be easily created by adding a new form, adding whatever controls you like, sizing it as you like, adding code and then just loading/unloading it whenever you like....
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.