Live Chat Icon For mobile
Live Chat Icon

How do I use the ColorDialog to pick a color

Platform: WinForms| Category: Common Dialogs

It is straight-forward. Create an instance of the class and call its ShowDialog method.

	ColorDialog colorDialog1 = new ColorDialog(); 
	//fontDialog1.ShowColor = true; 
	if(colorDialog1.ShowDialog() != DialogResult.Cancel ) 
		textBox1.ForeColor = colorDialog1.Color; 
	textBox1.Text = 'this is a test'; 

Share with

Related FAQs

Couldn't find the FAQs you're looking for?

Please submit your question and answer.