Click here to Skip to main content
15,888,816 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
What would be the code to change the Back color on a Color Menu Item to a color that the user selects from a dialog box. How to i get dialog box?

What I have tried:

colortoolstripmenuitem.backcolor= color. (whatever color the user selects from color dialog box)
Posted
Updated 18-Apr-17 2:21am
Comments
[no name] 17-Apr-17 21:44pm    
You can learn a lot by reading the documentation
Richard MacCutchan 18-Apr-17 3:03am    
Look at the properties of the control that you want to change.

Have a look at my article
VB.NET runtime control designer for windows forms[^]
There you will find example code for all you need to solve this task.
 
Share this answer
 
Your question isn't as clear as it could be. I am interpreting it as "how can I get the color that was selected on the dialog box passed to the main form where I want to use that color"

@NotPoliticallyCorrect has given you a good link if it is only color you are interested in...ColorDialog Class (System.Windows.Forms)[^]

If you want to pass more general information from a Dialog to a form have a look at this Tip - Transferring information between two forms, Part 2: Child to Parent[^] - it's a simpler to read version of what is going on in Solution 1.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900