Home

1000+ Visual Basic Multiple Choice Question Answer [Solved]

Thursday 9th of March 2023

Sharing is caring

1. The project extension name of a VB project is .vbj
A. True
B. False
C.
D.
Answer : B
2. Currency variable stores fixed point numbers with :
A. 2 decimal digits.
B. 3 decimal digits.
C. 4 decimal digits.
D. 6 decimal digits.
Answer : C
3. In case of visual basic, IDE means :
A. Internal Database Engineering.
B. Integrated Database Environment.
C. Integrated Development Environment.
D.
Answer : C
4. Sort is a method by which elements can be sorted in flexgrid control
A. True
B. False
C.
D.
Answer : B
5. It is possible to declare 'Dynamic Array' in visual basic.
A. True
B. False
C.
D.
Answer : A
6. Function Add(Num1 as integer, Num2 as integer) as integer
Add=Num1+Num2
Num1=0
Num2=0
End function
This body is an example of calling up a function by:

A. By optional argument.
B. By value.
C. By reference.
D.
Answer : C
7. The maximum length of a variable is _____________ characters.
A. 255
B. 254
C. 256
D. 257
Answer : A
8. Print' statement can be used to print any statement on the screen.
A. True
B. False
C.
D.
Answer : A
9. which should be included when an application is used without any forms
A. subroutines
B. function
C. main
D. sub-main
Answer : D
10. The title of the dialog box can be changed.
A. True
B. False
C.
D.
Answer : A
11. Time() function is used to recover date & time.
A. True
B. False
C.
D.
Answer : B
12. If the user wants to select the multiple files from file open and filesave dialog boxes then the flag must be set to
A. cdlOFNMultiselsectAllow
B. cdlOFNAllowMultiselect
C. It is not possible to select more than one file at a time
D. None
Answer : B
13. It is possible to build an application without using any form:
A. True
B. False
C.
D.
Answer : A
14. The arrange property of MDI form is available at design time.
A. True
B. False
C.
D.
Answer : B
15. Now() function will return the current drive and directory you are working on as return value.
A. True
B. False
C.
D.
Answer : B
16. Min and Max property can be used with Font common dialog box to determine
A. To controlling dialog box size
B. The minimum and maximum size displayed in the size list
C. None of the above
D.
Answer : B
17. MDI form1.Arrange vbTileHorizontal; this code in a MDI form will
A. If there are more than one MDI form then arrange them all in horizontal manner
B. Tiles all child form in horizontal manner
C. Tiles the MDI form horizontally
D. None of the above.
Answer : B
18. DocumentForm() it is
A. A function of MDI forms
B. An array of forms using as child into MDIform
C. None of the above
D.
Answer : B
19. One can change or read the alignment of one or more paragraph of rich text box control through
A. Text Alignment property
B. AlignmentSet property
C. SelAlignment property
D. None
Answer : C
20. Visual Basic produce:
A. 3 types of executable code.
B. 2 types of executable code.
C. 4 types of executable code
D. none of the above.
Answer : B
21. when using 'do until-loop' statement as stated below
I=10
Do until I>5
Print I
I=I+1
Loop
This statement will print

A. it will generate a run time error
B. no output will be shown
C. 10 11 12 13 14 15
D. none of the above
Answer : B
22. The extension name of a Visual Basic form is _____________.
A. .frm
B. .txt
C. .prj
D. .vbp
Answer : A
23. While running an application you can change the value of any variable and see it's effect through ___________ window.
A. intermediate
B. Immediate
C. current
D.
Answer : B
24. What will be the output when the statements below will execute :
Dim a as integer
a=0
while(a<5)
print a
a=a+1
end

A. It will generate the output like 0 1 2 3 4
B. It will generate a runtime error
C. It will generate a compiler error
D. It will display nothing
Answer : C
25. If there is a control array of label for 10 elements, then what will be the fifth element in the array?
A. label(5)
B. label(3)
C. label(4)
D. None
Answer : C
26. In a text box control the default caption for text box is text1.
A. True
B. False
C.
D.
Answer : B
27. Through which property of option button control one can change the font color of the caption.
A. Back color
B. Font color
C. Fore color
D. None
Answer : C
28. When using do loop-while statement then the statements within the loop body will be executed only once if the condition does not fulfilled
A. True
B. False
C.
D.
Answer : A
29. You can get the ASCII value of any character or number by using
A. ASC() function
B. ASCII() function
C. There is no function to get the ascii value.
D.
Answer : A
30. Instr$(text1.text,"visual") will returns :
A. No. of times the string "visual" is present in the string in text1.text.
B. It puts the control where it finds the text "visual" in the string given in text1.text.
C. First occurrence of the text "visual" within the string given in text1.text
D. None of the above.
Answer : C
31. To enable apply button in dialog box ; flag value should be set to
A. cdlCFApply
B. cdlcfTTOnly
C. cdcclHelpButton
D. None of the above
Answer : A
32. The size of 'Boolean' data type is :
A. 1 Byte.
B. 2 Bytes.
C. 4 Bytes.
D. 8 Bytes.
Answer : B
33. Delete method of the recordset of Data Control or Data Access Object is delete the record which is pointed out by the record pointer.
A. True
B. False
C.
D.
Answer : A
34. When someone uses the code like list1.list(1); then it will return the first item of the list box control.
A. True
B. False
C.
D.
Answer : B
35. Isnull(), IsEmpty() determines weather any variable has been initialize or not
A. True
B. False
C.
D.
Answer : A
36. To break a loop abnormally when satisfying a condition, we can use
A. Break statement
B. Exit statement
C. Both i & ii could be used.
D. None of the above.
Answer : B
37. In visual basic 'Break' statement could be used along with "Select Case"
A. True
B. False
C.
D.
Answer : B
38. To add the commondialog control to any project one has to include it from
A. File menu->component->Microsoft Common Dialog Control 6.0
B. Project menu->Component-> Microsoft Common Dialog Control 6.0
C. Component menu->project-> Microsoft Common Dialog Control 6.0
D. None of the above
Answer : B
39. RichTextBox1.BulletIndent=5 ; what will be the effect of this code if used in any program
A. It will set the bulleted indentation by the specified value
B. It will create a list of bullet of 5 items
C. All of the above
D.
Answer : A
40. Which property of list box control reports the number of selected items.
A. ListIndex
B. Selected
C. Selcount
D. NewIndex
Answer : C
41. Activate event is called before load event
A. True
B. False
C.
D.
Answer : B
42. It is possible to access a menu without using mouse, to access the menu ;pressing the Ctrl key and the letter assigned to access the menu
A. True
B. False
C.
D.
Answer : B
43. In timer control _____________ is the most important property.
A. Interval.
B. Front
C. backcolor
D.
Answer : A
44. If the Flag constant for the font common dialog box is cdlCFPrinterFonts then it causes the dialog box to show only the fonts supports by the printer specified by the hdc property
A. True
B. False
C.
D.
Answer : A
45. To run an application you have to press :
A. F3
B. F6
C. F5
D. F7
Answer : C
46. To get the property window in visual basic you have to press :
A. F3
B. F6
C. F4
D. F6
Answer : C
47. In _______________ control you can get only drop-down list of the content but cannot add directly anything to that control.
A. text box
B. combo box
C. List Box Control
D.
Answer : C
48. _____________ property of any control cannot change at run time.
A. color
B. name
C. caption
D.
Answer : B
49. In visual basic you can draw something in
A. Picture box control.
B. Image control.
C. Shape control.
D.
Answer : A
50. cell alignment property can be used to align the cells with different alignment style
A. True
B. False
C.
D.
Answer : A

Sharing is caring