.NET - Windows Controls
53.
What are the values that can be assigned to the DialogResult property of a Button control?
The DialogResult property of a Button control can be assigned a value from the DialogResult enumerations, which are as follows:
- Abort-Returns Abort
- Cancel-Returns Cancel
- Ignore-Returns Ignore
- No-Returns No
- None-Nothing is returned from the dialog box
- OK-Returns OK
- Retry-Returns Retry
- Yes-Returns Yes
54.
Why do you require user-defined controls?
User-defined controls are particularly useful in situations where you need to enhance the functionality of an existing control.
55.
Is it possible to enter more than one line in a TextBox control?
Yes, it is possible to enter more than one line in a TextBox control. To do this, you need to set the Multiline property of the TextBox control to True. You can set this property at design time as well as runtime. The syntax to set this property at runtime is as follows:
Textbox1.Multiline = true;
Textbox1.Multiline = true;
56.
How can you enable a text box to change its characters format, so that users can enter password?
You can set the PasswordChar property of the TextBox class to True to enable it to accept passwords. The code to change the PasswordChar property of the TextBox class is given as follows:
textBox1.PasswordChar = '*';
textBox1.PasswordChar = '*';
Quick links
Quantitative Aptitude
Verbal (English)
Reasoning
Programming
Interview
Placement Papers