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;
}
Write the syntax of the for loop in C# code?
Distinguish between read-only and constants variables which is used in the programs?
Differentiate between the ComboBox control and the ListBox control?
Which event controls are completely loaded?
Explain about the XML elements.
Describe the concept of Bookmarks in WF 4.0.
How we can populate the dataset before querying the DataSet object by using LINQ to DataSet?
Describe the differences between the Server-side and Client-side code?
Can more than one line be entered in a TextBox control?
Briefly explain ADO.NET and its features?
18,76,764
1960584 Asked
3,689
Active Tutors
1421903
Questions Answered
Start Excelling in your courses, Ask an Expert and get answers for your homework and assignments!!