Home

1000+ Visual Basic Multiple Choice Question Answer [Solved]

Thursday 9th of March 2023

Sharing is caring

1. In visual basic you can draw something in
A. Picture box control.
B. Image control.
C. Shape control.
D.
Answer : A
2. 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
3. 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
4. It is possible to change the password character property of text box control at run time.
A. True
B. False
C.
D.
Answer : B
5. The size of 'Boolean' data type is :
A. 1 Byte.
B. 2 Bytes.
C. 4 Bytes.
D. 8 Bytes.
Answer : B
6. which should be included when an application is used without any forms
A. subroutines
B. function
C. main
D. sub-main
Answer : D
7. 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
8. 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
9. The full form of IIS is :
A. Indian Institute of Science.
B. Internet Information Service
C. Industrial Information Services.
D.
Answer : B
10. Print' statement can be used to print any statement on the screen.
A. True
B. False
C.
D.
Answer : A
11. 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
12. which control structure are working under false condition
A. do-while loop & do loop-while
B. while-wend & for loop
C. do-while loop & while wend loop
D. do-until loop & do loop-until
Answer : D
13. 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
14. The arrange property of MDI form is available at design time.
A. True
B. False
C.
D.
Answer : B
15. The extension name of a Visual Basic form is _____________.
A. .frm
B. .txt
C. .prj
D. .vbp
Answer : A
16. IsDate() function returns true if its argument is a valid date and time
A. True
B. False
C.
D.
Answer : B
17. In runtime it is not possible to change the form size.
A. True
B. False
C.
D.
Answer : B
18. Activate event is called before load event
A. True
B. False
C.
D.
Answer : B
19. To get the property window in visual basic you have to press :
A. F3
B. F6
C. F4
D. F6
Answer : C
20. To draw a form on the screen which event is being called up
A. Draw Event
B. Load Event
C. Paint Event
D. Either i or iii
Answer : C
21. It is possible to pass different number parameters to a function when call the function on different time.
A. To do this one can use in the parameter list of that function
B. paramarray keyword with the array declaration
C. argument should be passed as array
D. none of the above
Answer : B
22. Suppose there is a data control named data1. What will be the effect if the following code is inserted
A. Data1.recordset.movefirst
B. The record pointer will move to the first record of the record set
C. The pointer will move to the first record of the original table that contains the data
D. It will refresh the recordset
Answer : B
23. 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
24. Time variable is used to store date and time in visual basic
A. True
B. False
C.
D.
Answer : B
25. There are _________________ no. of built in windows dialog boxes provided by common dialogs control.
A. 6
B. 7
C. 8
D. 9
Answer : A
26. It is possible to change the shortcut key assigned to any menu for accessing within the menu editor.
A. True
B. False
C.
D.
Answer : B
27. 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
28. The maximum length of a variable is _____________ characters.
A. 255
B. 254
C. 256
D. 257
Answer : A
29. Which property of list box control reports the number of selected items.
A. ListIndex
B. Selected
C. Selcount
D. NewIndex
Answer : C
30. What is the default value for multi-select property of list box control.
A. 1
B. 2
C. 0
D. none
Answer : C
31. List count property returns total number of items in list box control.
A. True
B. False
C.
D.
Answer : A
32. 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
33. The title of the dialog box can be changed.
A. True
B. False
C.
D.
Answer : A
34. Terminate is a valid event in form operation
A. True
B. False
C.
D.
Answer : A
35. The other Single Document Interface forms are by default child of MDI form when MDI form is inserted.
A. True
B. False
C.
D.
Answer : B
36. ABS() function will generate a hole value when used with a number with fraction part (ex: 125.26598)
A. True
B. False
C.
D.
Answer : A
37. 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
38. 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
39. Constants are processed faster than variables :
A. True
B. False
C.
D.
Answer : A
40. It is possible to load a MDI form without any childform.
A. True
B. False
C.
D.
Answer : A
41. It is possible to insert a picture in a option button control.
A. True.
B. False
C.
D.
Answer : A
42. In form load event, if the following code is written then guess what will be the output :
Dim I as integer, J as integer
I=0
J=5
While I<J
Print I
I=I+1
Wend

A. output will be 0 1 2 3 4
B. No output, blank form will be shown
C. Compiler error
D. None
Answer : B
43. To get the property window in visual basic you have to press
A. F6
B. F3
C. F4
D. F5
Answer : C
44. The fundamental property of RichTextBox control is
A. Text property
B. TextRTF property
C. RTFText property
D. All of the above
Answer : C
45. 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
46. In case of visual basic, IDE means :
A. Internal Database Engineering.
B. Integrated Database Environment.
C. Integrated Development Environment.
D.
Answer : C
47. In visual basic the default unit is :
A. centimeter.
B. Inch.
C. Dpi.
D. Twips .
Answer : D
48. The project extension name of a VB project is .vbj
A. True
B. False
C.
D.
Answer : B
49. In visual basic, number of loop control structure is _____________.
A. 4
B. 5
C. 6
D. 7
Answer : C
50. CommonDialogs control is visible at runtime
A. True
B. False
C.
D.
Answer : B

Sharing is caring