.NET - Windows Controls

41.
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.

42.
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() and Items.Insert() methods are used to add items; whereas, the Items.Remove(), Items.RemoveAt(), and Items.Clear() methods are used to delete items from a ListBox control.

43.
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.

44.
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();