Microsoft Communities

Welcome to WindowsClient.net | Sign in | Join

Here are some frequently asked questions about Windows Forms and their answers.

Windows Forms FAQs

How do I use the ColorDialog to pick a color?

It is straightforward. Create an instance of the class and call its ShowDialog method.

ColorDialog colorDialog1 = new ColorDialog(); 
if ( colorDialog1.ShowDialog() != DialogResult.Cancel ) 
  textBox1.ForeColor = colorDialog1.Color; 

Contributed from George Shepherd's Windows Forms FAQ



Page view counter