37. What is the use of the Panel control? Does it display at runtime?
Panels acts as a container to group other controls. It is an important control, when you want to show/hide a group of controls and relocate a number of controls simultaneously.
When you generate a new control at runtime, it works as a container control. As we know, it is a container control; therefore, it is not displayed at runtime.
38. Is it possible to add an image on the RadioButton control?
Yes, you can add an image on the RadioButton control by setting the Image property.
39. What is the use of a toolstrip container?
A toolstrip container is used to contain controls, such as ToolStrip, MenuStrip, and StatusStrip, so that these controls can be docked and moved at the run time.
40. Name the methods, available in .NET 4.0, that are used to add and delete items from a ListBox control?
The following methods can be used to add and delete items from a ListBox control. The Items.Add() andItems.Insert() methods are used to add items; whereas, the Items.Remove(), Items.RemoveAt(), andItems.Clear() methods are used to delete items from a ListBox control.
41. What is the importance of a Button control?
A Button control is an important Windows control, which provides the most common way of creating and handling an event in the code with the help of its Click event.
42. How can you unselect the selected items in a ListView control programmatically in .NET 4.0?
The syntax to unselect the selected items in the ListView control is shown in the following code snippets:
Code for VB:
Me.listView1.SelectedItems.Clear()
Code for C#:
this.listView1.SelectedItems.Clear();
Panels acts as a container to group other controls. It is an important control, when you want to show/hide a group of controls and relocate a number of controls simultaneously.
When you generate a new control at runtime, it works as a container control. As we know, it is a container control; therefore, it is not displayed at runtime.
38. Is it possible to add an image on the RadioButton control?
Yes, you can add an image on the RadioButton control by setting the Image property.
39. What is the use of a toolstrip container?
A toolstrip container is used to contain controls, such as ToolStrip, MenuStrip, and StatusStrip, so that these controls can be docked and moved at the run time.
40. Name the methods, available in .NET 4.0, that are used to add and delete items from a ListBox control?
The following methods can be used to add and delete items from a ListBox control. The Items.Add() andItems.Insert() methods are used to add items; whereas, the Items.Remove(), Items.RemoveAt(), andItems.Clear() methods are used to delete items from a ListBox control.
41. What is the importance of a Button control?
A Button control is an important Windows control, which provides the most common way of creating and handling an event in the code with the help of its Click event.
42. How can you unselect the selected items in a ListView control programmatically in .NET 4.0?
The syntax to unselect the selected items in the ListView control is shown in the following code snippets:
Code for VB:
Me.listView1.SelectedItems.Clear()
Code for C#:
this.listView1.SelectedItems.Clear();