Home

1000+ Visual Basic .NET MCQ for DRDO [Solved]

Thursday 9th of March 2023

Sharing is caring

1. The default location of the exe file of your solution is
A. ..../Project folder name
B. .../Project folder name/Bin
C. .../Project folder name/Debug
D. .../Project folder name/Debug/Bin
Answer : B
2. To display multiple columns in ListView the View property must be set to
A. SmallIcon
B. LargeIcon
C. Details
D. List
Answer : C
3. In OLEDB database can be accessed without using DataSet
A. True
B. False
C.
D.
Answer : A
4. A form can have only one default button
A. True
B. False
C.
D.
Answer : A
5. ScrollBars can be added to
A. Panel
B. GroupBox
C. Both a and b
D. None of the above
Answer : A
6. Using MyBase you can call base class
A. Constructor
B. Method
C. Variables
D. All of the above
Answer : D
7. To call a buttons click event use
A. Button1.Click
B. Button1.PerformClick
C. Button1.Clicked
D. None of the above
Answer : B
8. To uninstall a Windows Service ____________ is use
A. Installutil -I
B. Installutil -e
C. Installutil -u
D. Installutil -d
Answer : C
9. 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
10. To redimension an array with its previous values intact use ___________ keyword
A. RedimPreserve
B. Preserve
C. Redim
D. Redim Preserve
Answer : D
11. A single LinkLabel can support multiple links
A. True
B. False
C.
D.
Answer : A
12. This view pops up if "Ctrl+F1" is pressed
A. Help
B. Properties Window
C. Dynamic Help
D. Server Explorer
Answer : C
13. For the same class "Me" and MyBase" are same
A. True
B. False
C.
D.
Answer : A
14. 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
15. A single OLEDBAdapter can have many DataSets
A. True
B. False
C.
D.
Answer : A
16. A form can have only ______ Main Menu and _________ Context Menu
A. 1,1
B. 1,Multiple
C. Multiple,1
D. 1,2
Answer : B
17. The Apply button automatically appears of the Font Dialog Box is opened
A. True
B. False
C.
D.
Answer : B
18. /*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
19. If a Class in inherited, its constructor is inherited automatically and it is fired automatically
A. True
B. False
C.
D.
Answer : A
20. 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
21. ________ converts to long datatype
A. Clong
B. CLng
C. Lng
D. None of the above
Answer : B
22. Using ADODB multiple tables can be connected at a time
A. True
B. False
C.
D.
Answer : B
23. Finally is fired only when error occurs
A. True
B. False
C.
D.
Answer : B
24. This view is not present in VB.NET
A. Project Explorer
B. Class View
C. Resource View
D. Server Explorer
Answer : A
25. Default event handler of Splitter is
A. Splitter.Click
B. Splitter.Clicked
C. Splitter.Drag
D. None of the above
Answer : D
26. In ADODB the _____________ property is used to connect to the table
A. RecordSet
B. DataSource
C. RecordSource
D. Connection
Answer : A
27. To add controls at runtime use
A. Controls.New
B. Controls.AddNew
C. Controls.Add
D. Controls.AddItem
Answer : C
28. To print use
A. PrintDialog1.Print()
B. PrintDocument1.Print()
C. Printer1.Print()
D. None of the above
Answer : B
29. A DataSet can hold multiple tables even if there are similar fields
A. True
B. False
C.
D.
Answer : A
30. If a form call another form and the caller form is closed through code, then both forms are disposed
A. True
B. False
C.
D.
Answer : A
31. VB.NET supports Multi Level Inheritance
A. True
B. False
C.
D.
Answer : A
32. This property of TrackBar is not present
A. TickStyle.Both
B. TickStyle.None
C. TickStyle.TopLeft
D. TickStyle.BottomLeft
Answer : D
33. DomainUpDown control is used only for strings and NumericUpDown for numbers.
A. True
B. False
C.
D.
Answer : B
34. In TreeView to get the node the mouse is pointing to, use
A. GetNode
B. Node
C. GetNodeAt
D. SelectNode
Answer : C
35. 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
36. 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
37. Only derived class can have shadows keyword
A. True
B. False
C.
D.
Answer : A
38. _________ and _____________ combines to make a KeyPress event
A. KeyUp, KeyDown
B. KeyEnter, KeyRelease
C. KeyDown, KeyRelease
D. KeyEnter, KeyUp
Answer : A
39. 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
40. InputBox by default returns ________ values
A. Integer
B. Byte
C. Double
D. String
Answer : D
41. 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
42. 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
43. /*1. OleDataAdapterq1.update(DataSet1,"emp")
2. OleDataAdapterq1.update(DataSet1,"std")
3. DataSet1.Merge(DataSet1)
4. DataSet1.AcceptChanges()
/* The error is in line

A. 2
B. 4
C. 3
D. No Error
Answer : D
44. dim arr(10) as string,
the max index of the array is

A. 9
B. 10
C. Can be >10 also
D. None of the above
Answer : B
45. A form can not call itself
A. True
B. False
C.
D.
Answer : B
46. 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
47. We need multiple ErrorProviders from multiple controls.
A. True
B. False
C.
D.
Answer : B
48. Set 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.
Answer : B
49. PasswordChar property of a TextBox can accept " " (space) as the password char
A. True
B. False
C.
D.
Answer : B
50. FolderBrowserDialog displays
A. File
B. Folder
C. Drives
D. b and c
Answer : D

Sharing is caring