Windows control interview questions

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;

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 = ‘*’;

57. What does the TickFrequency property of the TrackBar control do?

The TickFrequency property gets or sets a value that specifies the distance between ticks. By default, the distance between ticks is 1.

58. Is it possible to associate a control with more than one ContextMenu control?

No, we cannot associate a control with more than one ContextMenu control.

59. What is the difference between the Panel and GroupBox control?

The Panel and GroupBox controls both can be used as a container for other controls, such as radio buttons and check box. The main differences between a Panel and a GroupBox control are as follows:
Panel does not display captions, while GroupBox do
Panel has scrollbar, while GroupBox does not
60. Does a Timer control appear at run time?

Timer is a component; therefore, it does not appear at run time.

Scroll to Top