Home
Winforms
Interview FAQs

FAQs of level

The Button control has the AutoSize property, which can be set to true or false. If we set the value of the AutoSize property to true, then the button control automatically alters its size according to the content displayed on it.

You can display a default value in the text box of an input box by using the DefaultResponse argument of the InputBox() function.

The PerformClick() method of the Button class is used to generate the Click event of the System.Windows.Forms.Control class.
There is an Interval property, which is responsible to get and set the time in milliseconds.
The Debug.Write call will not be compiled when the DEBUGsymbol is not defined (when doing a release build). Trace.Write calls will be compiled. Debug.Write is for information you want only in debug builds, Trace.Write is for when you want it in release build as well.

Dock Property- Gets or sets which edge of the parent container a control is docked to. A control can be docked to one edge of its parent container or can be docked to all edges and fill the parent container. For example, if you set this property to DockStyle.Left, the left edge of the
control will be docked to the left edge of its parent control. Additionally, the docked edge of  the control is resized to match that of its container control.
Anchor Property- Gets or sets which edges of the control are anchored to the edges of its container.  A control can be anchored to one or more edges of its parent container. Anchoring a control to its parent ensures that the anchored edges remain in the same position relative to the edges of the parent container when the parent container is resized.

WindowsDefaultLocation tells the form to start up at a location selected by OS, but with internally specified size. 

WindowsDefaultBounds delegates both size and starting position choices to the OS.

Both methods do the same, Move and Resize are the names adopted from VB to ease migration to C#.

Create a rectangular form, set the TransparencyKey property to the same value as BackColor, which will effectively make the background of the form transparent. Then set the FormBorderStyle to FormBorderStyle.None, which will remove the contour and contents of the form.

Call the static method FromArgb of this class and pass it the RGB values.
PreviousDisplaying 4 of 7Next
1 2 3 4 5 6 7
Need Help? Contact Us.

Log in

*
*

Forgot password?

*

New User

*
*
*
*