61. Name the parent class for all Windows controls.
The Control class or System.Windows.Forms.Control class is the parent class for all Window controls.
62. What is the MaskedTextBox control? What does the Mask property do?
The MaskedTextBox control is an improvement of the TextBox control. It forces the user to provide the proper input, which is specified by the Mask property. In other words, it prevents the user to provide any invalid input to an application. The Mask property gets or sets the input type to the MaskedTextBox control. There are many built-in formats for the Mask property, such as phone no., short date, time, zip code, and custom.
63. How can you adjust the height of a combo box drop-down list?
You can control the height of a combo box drop-down list by setting the MaxDropDownItems property of the combo box. The MaxDropDownItems property sets the maximum number of entries that will be displayed by the drop-down list.
64. How can you enforce a text box to display characters in uppercase?
The TextBox class contains the CharacterCasing property, which is used to specify the case of the content for a text box. This property accepts a value from the CharacterCasing enumeration of .NET Framework. The members specified in the CharacterCasing enumeration are Lower, Upper, and Normal. You can select any one of these enumerations as a value for the CharacterCasing property of a specified text box, as shown in the following code snippet:
textBox1.CharacterCasing = CharacterCasing.Upper;
65. Is it possible to associate a control with more than one ContextMenu?
No, we cannot associate a control with more than one ContextMenu.
The Control class or System.Windows.Forms.Control class is the parent class for all Window controls.
62. What is the MaskedTextBox control? What does the Mask property do?
The MaskedTextBox control is an improvement of the TextBox control. It forces the user to provide the proper input, which is specified by the Mask property. In other words, it prevents the user to provide any invalid input to an application. The Mask property gets or sets the input type to the MaskedTextBox control. There are many built-in formats for the Mask property, such as phone no., short date, time, zip code, and custom.
63. How can you adjust the height of a combo box drop-down list?
You can control the height of a combo box drop-down list by setting the MaxDropDownItems property of the combo box. The MaxDropDownItems property sets the maximum number of entries that will be displayed by the drop-down list.
64. How can you enforce a text box to display characters in uppercase?
The TextBox class contains the CharacterCasing property, which is used to specify the case of the content for a text box. This property accepts a value from the CharacterCasing enumeration of .NET Framework. The members specified in the CharacterCasing enumeration are Lower, Upper, and Normal. You can select any one of these enumerations as a value for the CharacterCasing property of a specified text box, as shown in the following code snippet:
textBox1.CharacterCasing = CharacterCasing.Upper;
65. Is it possible to associate a control with more than one ContextMenu?
No, we cannot associate a control with more than one ContextMenu.