Home

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

Thursday 9th of March 2023

Sharing is caring

1. 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
2. FolderBrowserDialog displays
A. File
B. Folder
C. Drives
D. b and c
Answer : D
3. Class cc
public _________ I as string
end class
Button1_Click
cc.I=100

A. Share
B. Shared
C. Global
D. Static
Answer : B
4. 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
5. 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
6. Using OLEDB you can connect more than one table
A. True
B. False
C.
D.
Answer : A
7. Only derived class can have shadows keyword
A. True
B. False
C.
D.
Answer : A
8. ScrollBars can be added to
A. Panel
B. GroupBox
C. Both a and b
D. None of the above
Answer : A
9. If you want to open a file named "a.txt" use
A. System.diagnostics.Start("a.txt")
B. System.Start("a.txt")
C. System.diagnostics.Process.Start("a.txt")
D. System.Process.Start("a.txt")
Answer : C
10. Finally is fired only when error occurs
A. True
B. False
C.
D.
Answer : B
11. On error goto lbl is a
A. Structured error
B. Unstructured error
C.
D.
Answer : B
12. The Apply button automatically appears of the Font Dialog Box is opened
A. True
B. False
C.
D.
Answer : B
13. If a Class in inherited, its constructor is inherited automatically and it is fired automatically
A. True
B. False
C.
D.
Answer : A
14. To display multiple columns in ListView the View property must be set to
A. SmallIcon
B. LargeIcon
C. Details
D. List
Answer : C
15. ________ converts to long datatype
A. Clong
B. CLng
C. Lng
D. None of the above
Answer : B
16. This property of TrackBar is not present
A. TickStyle.Both
B. TickStyle.None
C. TickStyle.TopLeft
D. TickStyle.BottomLeft
Answer : D
17. This view pops up if "Ctrl+F1" is pressed
A. Help
B. Properties Window
C. Dynamic Help
D. Server Explorer
Answer : C
18. The correct sequence of Form Loading is
A. Load
B. Initialize, Load, Activate
C. Initialize, Activate, Load
D. Activate, Initialize Load
Answer : B
19. 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
20. PasswordChar property of a TextBox can accept " " (space) as the password char
A. True
B. False
C.
D.
Answer : B
21. 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
22. A TreeView can have multiple root nodes
A. True
B. False
C.
D.
Answer : A
23. To add controls at runtime use
A. Controls.New
B. Controls.AddNew
C. Controls.Add
D. Controls.AddItem
Answer : C
24. To vertically arrange all forms in an MDI form use
A. Me.Layout(MdiLayout.TileVertical)
B. Me.MdiLayout(MdiLayout.TileVertical)
C. Me.LayoutMdi(MdiLayout.TileVertical)
D. Nothing is required because default is Vertical
Answer : C
25. 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
26. Two commands can be written in the same line using
A. :
B. ;
C. ,
D. .
Answer : A
27. A MsgBox can have maximum ___________ button(s)
A. 1
B. 2
C. 3
D. 4
Answer : C
28. A single LinkLabel can support multiple links
A. True
B. False
C.
D.
Answer : A
29. In reports ___________ property help to assign user-defined criteria
A. ReportSource
B. SectionFormula
C. Query
D. SelectionFormula
Answer : D
30. 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
31. 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
32. The EventLog's ________ method is used to write an entry to a log file
A. WriteLine
B. WriteEntry
C. Add
D. Append
Answer : B
33. Images can be loaded from
A. Images.FromFile
B. BitMap.FromFile
C. System.FromFile
D. Both a and b
Answer : D
34. Application.StartupPath actually points to
A. //ProjectName
B. //ProjectName/Bin
C. //ProjectName/Debug
D. //ProjectName/Bin/ProjectName.exe
Answer : B
35. A thread can be started only once
A. True
B. False
C.
D.
Answer : A
36. For the same class "Me" and MyBase" are same
A. True
B. False
C.
D.
Answer : A
37. Structured and Unstructured exceptions can't be mixed
A. True
B. False
C.
D.
Answer : B
38. To print use
A. PrintDialog1.Print()
B. PrintDocument1.Print()
C. Printer1.Print()
D. None of the above
Answer : B
39. 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
40. In ADODB the _____________ property is used to connect to the table
A. RecordSet
B. DataSource
C. RecordSource
D. Connection
Answer : A
41. A form can have only ______ Main Menu and _________ Context Menu
A. 1,1
B. 1,Multiple
C. Multiple,1
D. 1,2
Answer : B
42. If a Label control's AutoSize property is set to True, can you resize the control
A. Yes
B. No
C.
D.
Answer : B
43. 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
44. VB.NET supports Multi Level Inheritance
A. True
B. False
C.
D.
Answer : A
45. Dim a() as Integer-{1,2,3,4}is a valid statement
A. True
B. False
C.
D.
Answer : A
46. In TreeView to get the node the mouse is pointing to, use
A. GetNode
B. Node
C. GetNodeAt
D. SelectNode
Answer : C
47. 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
48. If nothing is selected in a combo box, its index value is
A. -1
B. 0
C. 1
D. Null
Answer : A
49. The name of the IDE window that allows you to see the hierarchical arrangement of the files in your project is
A. Server Explorer
B. Project Explorer
C. Solution Explorer
D. None of the above
Answer : C
50. To uninstall a Windows Service ____________ is use
A. Installutil -I
B. Installutil -e
C. Installutil -u
D. Installutil -d
Answer : C

Sharing is caring