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

ColorDialog Box Question

I am trying to control the default color that is selected the first time my
applciation is run and the color dialog box launches. I have a Tools/Options
menu item in my application. On the Options form is two picture boxes. When
I click on either one of them the ColorDialog box appears and the default
selected color is black. This happens even if the picture box has a
different colored background. If I then select, say, yellow the picture box
backcolor changes to yellow. When I select my OK button to close the form,
the color is written out to a line in an XML file. When I launch the
application again it reads the XML file and sets the Options proberly,
including the Yellow for the picturebox.backcolor. However, the first time I
launch the color dialog box again, it's default color is black. How can I
make the default selected color be the same as the backcolor of the picture
box I am clicking on even on the first time thru?

Thank you,
John
Nov 20 '05 #1
2 1474
Seems maybe you should set the COLOR property of the color dialog befores
showing

HTH,

Shane

"jcrouse" <me> wrote in message
news:uA**************@TK2MSFTNGP10.phx.gbl...
I am trying to control the default color that is selected the first time my applciation is run and the color dialog box launches. I have a Tools/Options menu item in my application. On the Options form is two picture boxes. When I click on either one of them the ColorDialog box appears and the default
selected color is black. This happens even if the picture box has a
different colored background. If I then select, say, yellow the picture box backcolor changes to yellow. When I select my OK button to close the form,
the color is written out to a line in an XML file. When I launch the
application again it reads the XML file and sets the Options proberly,
including the Yellow for the picturebox.backcolor. However, the first time I launch the color dialog box again, it's default color is black. How can I
make the default selected color be the same as the backcolor of the picture box I am clicking on even on the first time thru?

Thank you,
John

Nov 20 '05 #2
Resolved!

"jcrouse" <me> wrote in message
news:uA**************@TK2MSFTNGP10.phx.gbl...
I am trying to control the default color that is selected the first time my applciation is run and the color dialog box launches. I have a Tools/Options menu item in my application. On the Options form is two picture boxes. When I click on either one of them the ColorDialog box appears and the default
selected color is black. This happens even if the picture box has a
different colored background. If I then select, say, yellow the picture box backcolor changes to yellow. When I select my OK button to close the form,
the color is written out to a line in an XML file. When I launch the
application again it reads the XML file and sets the Options proberly,
including the Yellow for the picturebox.backcolor. However, the first time I launch the color dialog box again, it's default color is black. How can I
make the default selected color be the same as the backcolor of the picture box I am clicking on even on the first time thru?

Thank you,
John

Nov 20 '05 #3

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

Similar topics

1
by: Ekey | last post by:
Hi: I want to realize the function that get a transparent color with standard ColorDialog ,but standard ColorDialog is not transparent color.i do not want to define a dialog such as colordialog by...
2
by: SpotNet | last post by:
Hi Newsgroup, I've been creating (almost done) Common Dialog class libraries (under one name space) with highly customisable common dialogs. With my ColorDialog I am able to completely hide...
1
by: Pierre | last post by:
Hi, Allowing my User to set Excel charts colors in my app with the help of a ColorDialog, I'm facing the following problem : the ColorDialog Colors does not suit with the Excel ones. So, here...
0
by: Steve Randall | last post by:
If you enable the 'define custom colors' button on the ColorDialog control the displayed form displays the basic colors on the left-hand side and the 'color builder' on the right-hand side. ...
1
by: Steve Randall | last post by:
If I use the standard ColorDialog control to select a colour (say a pale blue) I get the returned value of 16762980 which is fine (Red=100, Green=200, Blue=255), BUT why when I use the following do I...
0
by: Jefe | last post by:
Hi Everyone, Does anyone know how can I set the ColorDialog's title? regards,
0
by: ThunderMusic | last post by:
Hi, problem #1 : I have a MenuStrip on my Windows form and it doesn't get painted (is transparent) unless I move the form... Anyone ever encountered this? Anyone knows what could cause it? ...
1
by: nanaalwi | last post by:
Hi all, I'm doing a software using vb.net that related to excel. The software that i implement requires filling the color inside the cells. Previously, the source code that I used is: ...
4
by: MickT | last post by:
On an Options form I am setting a textbox.backcolor to a colour selected from the colordialog control, so that the backcolor of all textboxes in an application may be set to the user's preference. ...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
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...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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: 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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.