By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
444,168 Members | 2,548 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 444,168 IT Pros & Developers. It's quick & easy.

ColorDialog Box Question

P: n/a
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
Share this Question
Share on Google+
2 Replies


P: n/a
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

P: n/a
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 discussion thread is closed

Replies have been disabled for this discussion.