Home

1000+ Visual Basic .NET Multiple Choice Question Answer [Solved]

Thursday 9th of March 2023

Sharing is caring

1. The Apply button automatically appears of the Font Dialog Box is opened
A. True
B. False
C.
D.
Answer : B
2. Using ADODB multiple tables can be connected at a time
A. True
B. False
C.
D.
Answer : B
3. A function can have multiple return statements
A. True
B. False
C.
D.
Answer : B
4. ________ converts to long datatype
A. Clong
B. CLng
C. Lng
D. None of the above
Answer : B
5. To get details about an error use
A. Err.Message
B. Err.Desc
C. Err.Description
D. Err.Number
Answer : C
6. ScrollBars can be added to
A. Panel
B. GroupBox
C. Both a and b
D. None of the above
Answer : A
7. To add items stored in an array to a ListView use
A. List1.Add(name of the array)
B. List1.AddItem(name of the array)
C. List1.Items.Add(name of the array)
D. List1.Items.Addrange(name of the array)
Answer : D
8. InputBox by default returns ________ values
A. Integer
B. Byte
C. Double
D. String
Answer : D
9. Application.StartupPath actually points to
A. //ProjectName
B. //ProjectName/Bin
C. //ProjectName/Debug
D. //ProjectName/Bin/ProjectName.exe
Answer : B
10. The default Tab of a Tab Control is
A. The first tab
B. The last tab added
C. The last tab modified
D. There is no default tab.
Answer : A
11. In ADODB the _____________ property is used to connect to the table
A. RecordSet
B. DataSource
C. RecordSource
D. Connection
Answer : A
12. To make a button the default button, this property of the form must be set
A. DefaultButton
B. AcceptButton
C. DialogResult
D. None of the above
Answer : B
13. Images can be loaded from
A. Images.FromFile
B. BitMap.FromFile
C. System.FromFile
D. Both a and b
Answer : D
14. If a Form is Inherited from another Form and both Forms have certain codes in their respective Form_Load event, then while running the program
A. Only the first Forms code will be executed
B. Only the second Forms code will be executed
C. Both Forms code will be executed
D. None of the above
Answer : C
15. You create a UserControl having a TextBox and include that in a separate Form. Can you use all the properties of the TextBox in the UserControl from that Form?
A. Yes
B. No
C.
D.
Answer : B
16. PasswordChar property of a TextBox can accept " " (space) as the password char
A. True
B. False
C.
D.
Answer : B
17. To redimension an array with its previous values intact use ___________ keyword
A. RedimPreserve
B. Preserve
C. Redim
D. Redim Preserve
Answer : D
18. _________ and _____________ combines to make a KeyPress event
A. KeyUp, KeyDown
B. KeyEnter, KeyRelease
C. KeyDown, KeyRelease
D. KeyEnter, KeyUp
Answer : A
19. On error goto lbl is a
A. Structured error
B. Unstructured error
C.
D.
Answer : B
20. A user wants that custom colors are visible when the Color Dialog Box is first Opened. What should he do?
A. Set AllowFullOpen to True
B. Set AnyColor to True
C. Set Open to True
D. Set FullOpen to True
Answer : D
21. The default event handler of TextBox is
A. KeyPress
B. Changed
C. TextChanged
D. Validating
Answer : C
22. What cannot be done if the table has no primary key
A. Insert and Update
B. Update and Delete
C. Select and Delete
D. Insert and Select
Answer : B
23. The correct sequence of Form Loading is
A. Load
B. Initialize, Load, Activate
C. Initialize, Activate, Load
D. Activate, Initialize Load
Answer : B
24. Get method is used to
A. Assign a value to an user control
B. Read value from an user control
C. Both of the above
D. None of the above
Answer : A
25. To use HelpProvider, the following properties of the form needs to be set
A. HelpButton
B. MaximizeBox
C. MinimizeBox
D. All of the above
Answer : D
26. For the same class "Me" and MyBase" are same
A. True
B. False
C.
D.
Answer : A
27. If nothing is selected in a combo box, its index value is
A. -1
B. 0
C. 1
D. Null
Answer : A
28. /*1. Class C
2. public notoverridable sub abc()
3. msgbox("Base Class")
4. end sub
5. end Class /* The Error in Line No.

A. 2
B. 3
C. 4
D. No Error
Answer : A
29. If Scrollbars property of a TextBox is set to Hortizontal and the WordWrap property is also set to true. Which one will get precedence
A. Scrollbars
B. WordWrap
C. No precedence both will work
D.
Answer : B
30. A Windows Service if installed cannot be uninstalled
A. True
B. False
C.
D.
Answer : B
31. /*1. Class C
2. public mustinherit sub abc()
3. msgbox("Base Class")
4. end sub
5. end Class /* The error is in line no.

A. 1
B. 2
C. 3
D. 4
Answer : A
32. Function abc() As String
Return 10
End Function

A. Will produce compilation error
B. Will produce runtime error
C. The function will execute normally
D. None of the above
Answer : A
33. A DataSet can hold multiple tables even if there are similar fields
A. True
B. False
C.
D.
Answer : A
34. VB.NET supports Multi Level Inheritance
A. True
B. False
C.
D.
Answer : A
35. If a button click event is to be fired when the user press the 'Esc' key, set the buttons name against forms _________ property
A. DefaultButton
B. AcceptButton
C. DialogResult
D. CancelButton
Answer : D
36. ___________ is used to pass copies of a variable while __________ is used to pass address of a variable.
A. Byval, Byref
B. Byref, Byval
C. Any one of the above
D. None of the above
Answer : A
37. Use a _________ statement to make Visual Basic object the default object for a set of enclosed Visual Basic statements.
A. With
B. Using
C. Import
D. Inherit
Answer : A
38. A single OLEDBAdapter can have many DataSets
A. True
B. False
C.
D.
Answer : A
39. To retrieve the default path of the project use
A. Application.Path
B. Application.DefaultPath
C. Application.StartupPath
D. Application.ProjectPath
Answer : C
40. In TreeView to collapse all the nodes of a selected node ___________ method is used
A. CollapseAll
B. Collapse
C. Any one of the above
D. None of the above
Answer : B
41. If an user-defined class have a user-defined event then, the class object is declared as
A. Dim c as new ClassName
B. Dim withEvents c as new ClassName
C. Dim c as ClassName
D. Dim withEvents c as ClassName
Answer : B
42. In TreeView to get the node the mouse is pointing to, use
A. GetNode
B. Node
C. GetNodeAt
D. SelectNode
Answer : C
43. Data from DataSet is accessed using34
A. Binding Obejct
B. BindContext Object
C. BindingContext Object
D. EndCurrentEdit Object
Answer : C
44. In ListView the item that is currently selected is determined by
A. SelectedItem
B. Item
C. FocussedItem
D. GetSelected
Answer : C
45. A TreeView can have multiple root nodes
A. True
B. False
C.
D.
Answer : A
46. Only derived class can have shadows keyword
A. True
B. False
C.
D.
Answer : A
47. A form can not call itself
A. True
B. False
C.
D.
Answer : B
48. To call a buttons click event use
A. Button1.Click
B. Button1.PerformClick
C. Button1.Clicked
D. None of the above
Answer : B
49. When a project is Built it creates a _______ and ________ file under Bin directory
A. .exe, .sln
B. .exe, .dll
C. .dll, .sln
D. .exe, .ocx
Answer : B
50. If MustOverride is used then ____________ is also a must.
A. Overridable
B. Inherits
C. MustInherit
D. None of the above
Answer : C

Sharing is caring