I mean I want to use a button to create Color Dialog to change the color of text boxes.
Please Guide me.
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend4days leftRegister
VulpesRank #55 · 29.2K reputationPosted Jun 30, 2014, 1:50 AM EDT
If you want to change the background color of all textboxes on the form, then replace this line:
textBox1.BackColor = cd.Color;
with this:
RecursiveChangeBackColorTextBoxes(this.Controls, cd.Color);
and add this method:
VulpesRank #55 · 29.2K reputationPosted Jun 30, 2014, 3:29 AM EDT
or to change the foreground color of all textboxes on the form, then replace this line:
textBox1.ForeColor = cd.Color;
with this:
RecursiveChangeForeColorTextBoxes(this.Controls, cd.Color);
and add this method:
VulpesRank #55 · 29.2K reputationPosted Jul 3, 2014, 2:32 AM EDT
Just tried it myself and it worked perfectly.
Joe WilsonRank #631 · 3.8K reputationPosted Jun 30, 2014, 3:24 AM EDT
Joe WilsonRank #631 · 3.8K reputationPosted Jul 3, 2014, 2:10 AM EDT
Joe WilsonRank #631 · 3.8K reputationPosted Jul 3, 2014, 4:19 AM EDT