Choose color from ColorDialog box
How we can choose the color from a ColorDialog box?
Expert
To choose color from a color dialog box, we must create the instance of a ColorDialog box and invoke to the ShowDialog() method. Code to display color dialog box and put the BackColor property of a Label control similar to a color selected in a color dialog box control is as follows:
private void button1_Click(object sender, EventArgs e)
{
if (colorDialog1.ShowDialog() != DialogResult.Cancel)
label1.Text = "Here's my new color!";
label1.BackColor = colorDialog1.Color;
}
How to identify that whether any changes are made or not to a DataSet object while it was last loaded?
Is it possible for users to define their own exceptions in code?
Can more than one line be entered in a TextBox control?
What are the enrichment in the ClickOnce deployment in the .NET 4.0?
Describe the relationship between an object and the class?
Explain about LinqDataSource control?
Explain what is meant by CTS, and how it is related to the CLS?
Is it possible to post and access view state in the other application?
In what way we can alter height of the combo box drop-down list?
What is web.config file?
18,76,764
1951532 Asked
3,689
Active Tutors
1437320
Questions Answered
Start Excelling in your courses, Ask an Expert and get answers for your homework and assignments!!