37. How can you place a border around a picture box?
The PictureBox control offers the BorderStyle property, which can be set to define the style of its border. This property can accept any of the three values from Fixed3D, FixedSingle, or None. These properties can be easily set through code or through the Properties window of the Visual Studio IDE.
38. How do we format numbers, dates, and currencies in a text box?
Each type has a ToString() method that can used to format date, currencies, and numbers. You can also use the String.Format() method to format these things as well. To format dates, use the ToString() member of the DateTime type.
39. 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.
40. 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.
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.
Discover more from aspirant corner
Subscribe to get the latest posts sent to your email.