Programming MCQs

MCQ Questions On Windows Forms In VB.Net Part-1

Pinterest LinkedIn Tumblr

This set of MCQ questions on windows forms in VB.net includes MCQ questions on different properties, methods, procedures and events used to create windows forms in vb.net along with its functions and keywords.

1. ………………… property on windows forms, gets or sets the size and location of the form on the windows desktop.
A) Clientsize
B) Size
C) DesktopBounds
D) Bounds

2. Windows forms public object property, …………….. gets or sets the bounding rectangle for the form.
A) Clientsize
B) Size
C) DesktopBounds
D) Bounds

3. ………………. method on windows forms public object methods, gets the child control that is located at the specified co-ordinates.
A) GetChildAtPoint
B) GetNextControl
C) GetChildControl
D) GetChildPoint

4. ……………. method finds the location of the specified screen point to client co-ordinates.
A) PointClient
B) GetClient
C) PointToClient
D) FocusClient

5. ……………. event occurs when a key is pressed while the form has the focus.
A) Keydown
B) Keypress
C) Keyup
D) KeyEnter

6. In the new sub procedure of windows forms, the code calls a procedure named ………………., which adds and arranges the controls in the form.
A) InitializeComponent
B) AddComponet
C) NewComponet
D) SubComponent

7. ……………….. keyword is used to refer to the current object.
A) Current
B) Me
C) This
D) ThisForm

8. The possible values for the FormBorderStyle property is/are the following
i) Fixed3D   ii) None  iii) FixedSingle   iv) VariableDialog
A) i, ii and iii only
B) ii, iii and iv only
C) i, ii and iv only
D) All i, ii, iii and iv

9. Form’s ………………. property is used to specify t he initial position on the screen.
A) InitialPosition
B) StartPosition
C) StartScreen
D) InitialScreen

10. We can assign form’s start position property values from the FormStartPosition enumeration, with the following values.
i) Certerpart   ii) CenterScreen   iii) Manual   iv) Location
A) i, ii and iii only
B) ii, iii and iv only
C) i, ii and iv only
D) All i, ii, iii and iv

11. Which of the following is the correct way of assigning value “centerscreen” for form’s startposition property.
A) StartPosition.Form1=FormStartPosition.CenterScreen
B) Form1.StartPosition=CenterScreen.FormStartPosition
C) Form1.StartPosition=FormStartPosition.CenterScreen
D) Form1.StartPosition=FormStartPosition.Location.CenterScreen

12. ………….. class is built into the .Net Framework to display messages and accept input from the user.
A) Msgbox
B) MessageBox
C) InputBox
D) DisplayBox

13. …………….. is a string expression displayed as the message in the dialog box.
A) Prompt
B) Message
C) Expression
D) Dialog

14. Which of the following is/are the possible values of MsgBoxResult returned from MsgBox function.
i) Ok    ii) Cancel   iiii) Abort   iv) Retry   v) Ignore
A) i, ii, iii and v only
B) i, ii, iii and iv only
C) ii, iii, iv and v only
D) All i, ii, iii, iv and v

15. ………………… is one of the MessageBoxDefaultButton enumeration values that specifies which is the default button for the message box.
A) DefaultButton
B) MessageButton
C) MessageBox
D) DefaultMessage

16. Which of the following is NOT the MessageBoxButtons enumeration value.
A) Ok
B) OkCancel
C) None
D) YesNo

17. Which of the following is/are the MessageBoxIcon enumeration values.
i) Astrisk   ii) Error  iii) Hand   iv) Ok
A) i, ii and iii only
B) ii, iii and iv only
C) i, ii and iv only
D) All i, ii, iii and iv

18. ……………… property returns a value of the ……………….. enumeration when the dialog box is closed.
A) DockPadding
B) DialogResult
C) Dialog Padding
D) DockResult

19. ……………… property of windows form sets the padding used between docked controls and the form’s edge.
A) DockPadding
B) DialogResult
C) Dialog Padding
D) DockResult

20. The Get and Set methods in the …………….. property to get and set the text in the text box.
A) Getdata
B) Textdata
C) Textproperty
D) GetSet

Answers

1. C) DesktopBounds
2. D) Bounds
3. A) GetChildAtPoint
4. C) PointToClient
5. B) Keypress
6. A) InitializeComponent
7. B) Me
8. A) i, ii and iii only
9. B) StartPosition
10. A) i, ii and iii only
11. C) Form1.StartPosition=FormStartPosition…
12. B) MessageBox
13. A) Prompt
14. D) All i, ii, iii, iv and v
15. A) DefaultButton
16. C) None
17. A) i, ii and iii only
18. B) DialogResult
19. A) DockPadding
20. B) Textdata

Read Next: MCQ Questions On Windows Forms In VB.Net Part-2

Author

Shuseel Baral is a web programmer and the founder of InfoTechSite has over 8 years of experience in software development, internet, SEO, blogging and marketing digital products and services is passionate about exceeding your expectations.

Comments are closed.