Home

1000+ Visual Basic Multiple Choice Question Answer [Solved]

Thursday 9th of March 2023

Sharing is caring

1. 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
2. Which property of list box control reports the number of selected items.
A. ListIndex
B. Selected
C. Selcount
D. NewIndex
Answer : C
3. 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
4. Print' statement can be used to print any statement on the screen.
A. True
B. False
C.
D.
Answer : A
5. In visual basic the default unit is :
A. centimeter.
B. Inch.
C. Dpi.
D. Twips .
Answer : D
6. Time() function is used to recover date & time.
A. True
B. False
C.
D.
Answer : B
7. It is not possible to change the back color property of option button control at run time.
A. True
B. False
C.
D.
Answer : B
8. 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
9. 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
10. 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
11. The full form of IIS is :
A. Indian Institute of Science.
B. Internet Information Service
C. Industrial Information Services.
D.
Answer : B
12. cell alignment property can be used to align the cells with different alignment style
A. True
B. False
C.
D.
Answer : A
13. 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
14. In visual basic Bool variable stores
A. 2 bytes
B. 1 bytes
C. 4 bytes
D. none of the above.
Answer : D
15. It is possible to build an application without using any form:
A. True
B. False
C.
D.
Answer : A
16. 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
17. What is the default value for multi-select property of list box control.
A. 1
B. 2
C. 0
D. none
Answer : C
18. 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
19. In database application, any field does not contain any values can be recognized by:
A. Nothing value.
B. Null value.
C. Error value.
D. Empty value.
Answer : B
20. 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
21. CommonDialog1.ShowOpen
Filename1=CommonDialog1.Filename
The above code will

A. Set the filename1 by the selected filename from the common dialog contol.
B. First displays the open dialog box and let the user select any file from any
C. location and then set the filename1 by the selected filename.
D. Both are true.
Answer : B
22. 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
23. It is possible to declare 'Dynamic Array' in visual basic.
A. True
B. False
C.
D.
Answer : A
24. Suppose there are two forms; form1 and form2 ; if there are codes like : In form1.active event
Form2.show
And in form2.active event
Form1.show
Then what will be the output ?

A. Two forms will be just showed.
B. Two forms will be showed and the control will passed continuously to each other.
C. Nothing will be displayed
D. None of the above.
Answer : B
25. 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
26. In visual basic 'Break' statement could be used along with "Select Case"
A. True
B. False
C.
D.
Answer : B
27. The fundamental property of RichTextBox control is
A. Text property
B. TextRTF property
C. RTFText property
D. All of the above
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. 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
30. 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
31. To run an application you have to press :
A. F3
B. F6
C. F5
D. F7
Answer : C
32. 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
33. To get the property window in visual basic you have to press :
A. F3
B. F6
C. F4
D. F6
Answer : C
34. Isnull(), IsEmpty() determines weather any variable has been initialize or not
A. True
B. False
C.
D.
Answer : A
35. Data1.Recordset.FindFirst "State=NY"
The above code will find the record in a given database

A. Find the first record in the given database
B. Find the first record in the given database in which the state is NY.
C. The above command will find a record very fast where the state is NY
D. None of the above
Answer : B
36. Say there is a string "Ramcharan"; when someone using Mid() function like MID("Ramcharan",2) then what will be the output:
A. "Ra"
B. "Ch"
C. "Amcharan"
D. None of the above
Answer : C
37. 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
38. You can get a dropdown list and as well as can add some text directly to ____________ Control.
A. listbox
B. command
C. Combo Box.
D. none of this
Answer : C
39. 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
40. 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
41. It is possible to insert a picture in a option button control.
A. True.
B. False
C.
D.
Answer : A
42. The size of 'Boolean' data type is :
A. 1 Byte.
B. 2 Bytes.
C. 4 Bytes.
D. 8 Bytes.
Answer : B
43. Activate event is called before load event
A. True
B. False
C.
D.
Answer : B
44. 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
45. In visual basic, number of loop control structure is _____________.
A. 4
B. 5
C. 6
D. 7
Answer : C
46. CommonDialog control is the default control that anyone can find in the toolbar when a new project is started
A. True
B. False
C.
D.
Answer : B
47. 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
48. It is possible to change the password character property of text box control at run time.
A. True
B. False
C.
D.
Answer : B
49. 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
50. The arrange property of MDI form is available at design time.
A. True
B. False
C.
D.
Answer : B

Sharing is caring