Home

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

Thursday 9th of March 2023

Sharing is caring

1. 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
2. A MsgBox can have maximum ___________ button(s)
A. 1
B. 2
C. 3
D. 4
Answer : C
3. Dim S as Integer=10
Text1=S
Msgbox(Text1.Text)

A. Will return error
B. Will return 10
C. Will return 0
D. Will return Null
Answer : A
4. 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
5. PasswordChar property of a TextBox can accept " " (space) as the password char
A. True
B. False
C.
D.
Answer : B
6. 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
7. FolderBrowserDialog displays
A. File
B. Folder
C. Drives
D. b and c
Answer : D
8. This property of TrackBar is not present
A. TickStyle.Both
B. TickStyle.None
C. TickStyle.TopLeft
D. TickStyle.BottomLeft
Answer : D
9. 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
10. 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
11. A function can have multiple return statements
A. True
B. False
C.
D.
Answer : B
12. 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
13. A form can have only ______ Main Menu and _________ Context Menu
A. 1,1
B. 1,Multiple
C. Multiple,1
D. 1,2
Answer : B
14. In reports ___________ property help to assign user-defined criteria
A. ReportSource
B. SectionFormula
C. Query
D. SelectionFormula
Answer : D
15. You can assign a Main Menu to any control
A. True
B. False
C.
D.
Answer : B
16. A TreeView can have multiple root nodes
A. True
B. False
C.
D.
Answer : A
17. 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
18. The SelectionMode property of a CheckedList Box can be set only to
A. One
B. MultiSimple
C. MultiExtended
D. None of the abvove
Answer : A
19. ________ converts to long datatype
A. Clong
B. CLng
C. Lng
D. None of the above
Answer : B
20. Data from DataSet is accessed using34
A. Binding Obejct
B. BindContext Object
C. BindingContext Object
D. EndCurrentEdit Object
Answer : C
21. Using ADODB multiple tables can be connected at a time
A. True
B. False
C.
D.
Answer : B
22. Two commands can be written in the same line using
A. :
B. ;
C. ,
D. .
Answer : A
23. In ADODB the _____________ property is used to connect to the table
A. RecordSet
B. DataSource
C. RecordSource
D. Connection
Answer : A
24. Only derived class can have shadows keyword
A. True
B. False
C.
D.
Answer : A
25. 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
26. Application.StartupPath actually points to
A. //ProjectName
B. //ProjectName/Bin
C. //ProjectName/Debug
D. //ProjectName/Bin/ProjectName.exe
Answer : B
27. A single LinkLabel can support multiple links
A. True
B. False
C.
D.
Answer : A
28. 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
29. Finally is fired only when error occurs
A. True
B. False
C.
D.
Answer : B
30. ScrollBars can be added to
A. Panel
B. GroupBox
C. Both a and b
D. None of the above
Answer : A
31. A Windows Service if installed cannot be uninstalled
A. True
B. False
C.
D.
Answer : B
32. _________ actually updates the values in a DataSet permanently
A. OleDataAdapterq1.update(DataSet1,"emp")
B. DataSet1.Merge(DataSet1)
C. DataSet1.AcceptChanges()
D. DataSet1.Update()
Answer : C
33. If Option Explicit is on then Dim i as Integer="10" will produce an error
A. True
B. False
C.
D.
Answer : B
34. /*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
35. This view pops up if "Ctrl+F1" is pressed
A. Help
B. Properties Window
C. Dynamic Help
D. Server Explorer
Answer : C
36. Using OLEDB you can connect more than one table
A. True
B. False
C.
D.
Answer : A
37. If nothing is selected in a combo box, its index value is
A. -1
B. 0
C. 1
D. Null
Answer : A
38. A single OLEDBAdapter can have many DataSets
A. True
B. False
C.
D.
Answer : A
39. To uninstall a Windows Service ____________ is use
A. Installutil -I
B. Installutil -e
C. Installutil -u
D. Installutil -d
Answer : C
40. In Class, Me.Show and MyClass.Show are same (Show is method name)
A. True
B. False
C.
D.
Answer : A
41. VB.NET does not support control arrays
A. True
B. False
C.
D.
Answer : A
42. 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
43. InputBox by default returns ________ values
A. Integer
B. Byte
C. Double
D. String
Answer : D
44. To add controls at runtime use
A. Controls.New
B. Controls.AddNew
C. Controls.Add
D. Controls.AddItem
Answer : C
45. A thread can be started only once
A. True
B. False
C.
D.
Answer : A
46. The default event handler of TextBox is
A. KeyPress
B. Changed
C. TextChanged
D. Validating
Answer : C
47. To view Panels of a StatusBar set _________ to true
A. Panel
B. Panels
C. ShowPanel
D. ShowPanels
Answer : D
48. In TreeView to get the node the mouse is pointing to, use
A. GetNode
B. Node
C. GetNodeAt
D. SelectNode
Answer : C
49. On error goto lbl is a
A. Structured error
B. Unstructured error
C.
D.
Answer : B
50. To redimension an array with its previous values intact use ___________ keyword
A. RedimPreserve
B. Preserve
C. Redim
D. Redim Preserve
Answer : D

Sharing is caring