Вы находитесь на странице: 1из 13

Question Bank for Visual Basic

1. What reasons are there for creating custom interface?

2. What is an object model and how do they benefit s/w development?
3. What is universal data access?
4. What are the two properties of the text box that are used to bind it to a record set
5. Identify the 3 types of property procedures & state when would you use them.
6. Identify the built in events for class modules & explain custom events.
7. Explain the process for using a class module in an application.
8. Explain early and late binding & the effect of each on the performance of an
9. Explain how to create controls at run time.
10. Discuss control collection in V.B. including its properties, uses & how to create it.
11. Explain how to create a menu & menu item at run time?.
12. Explain the concept of validation.
13. What does the immediate window allow you to do while debugging?
14. How can setting the break when value is true option for a watch help you to debug
your code?
15. What are the 2 properties of the error object that can be useful in determining the
cause at an error within an error handler?
16. What are stored procedures & how they benefit your application?
17. What is a cursor ? What 2 locations can cursor exists?
18. Explain concept collection instead of array.
19. What is the difference between function call by value & call by reference?
20. What is the difference between class module & standard module?
21. Explain the following :
i. Clipboard
ii. Com
iii. Control array
iv. Dialog box
v. Event driven
vi. Event procedure
vii. Event trapping
viii. Procedure call with argument
ix. MDI & SDI
x. Validation rule

2. Explain any 5 data types.

3. Explain the concept of message box.
4. Explain the difference between check box & option button.
5. When do we use combo box & list box?
6. Explain any 3 format date & time function.
7. Explain the difference between lost focus, got focus & set focus.
8. Explain the declaration statement.
9. Explain the concept of variable scope.

10. Explain the difference between :

a. #Input & #Output.
b. #Get & #Write.
11. How to decide when to use a random file mode & append mode?
12. How to create dynamic array of user defined data type?
Explain with following example:
Create Emp data type
13. Explain the collection property with syntax.
14. Explain the concept of initialize & terminate event at class.
15. Explain BOF, LOF & EOF.
16. Explain the concept of date bound.
17. Explain the 3 steps of debugging.
18. Write program to add new record, find record, display previous record & last
19. Explain any 3 print methods.
20. Explain the concept of Active-X Control.
21. How to use input box to randomly retrieve the records?
22. Explain the concept of record set.
23. What the use of nomatch property?
24. Explain the difference between find & seek.
25. Explain the concept of trapping database errors.
26. What is database field & vbfield?
27. What are dynasets & snapshots?
28. How to change enable & disable & caption property of a button at run time?
29. Explain the difference between static & constant.
30. Explain hoe to search data from list using do loop.
31. Explain all form events in sequence.
32. Write code for cut, copy & paste of selected text.
33. Explain any 5 string functions with syntax.
34. Explain any 5 mathematical functions with syntax.
35. Explain the prefix concept with suitable example.
36. Explain any 2 types of errors.
37. Write a program to display the no of years difference after entering the date of
38. Explain the use of timer control.
39. write a program to add item, remove item & sort the list. Also search the data
items from that.
40. Explain activate & deactivate event of form.
41. What is the difference between load & show form?
42. Explain the spc & tab function.
43. Create PMT function & call that in command button. Display all values in
different text boxes.
44. What is general procedure & function procedure?
45. Write a program to calculate discount using option button & display grass total &
net total.

25% Gross Amt

20% Net Amt

10% Discount Amt

46. Write a program using 2 dimensional array student rollno. & 2 subject marks.
47. Explain the graphic method.
48. Write a program using list box. Select the drawing object & draw the selected
object in picture box.
49. Write a program to open a file. Add the following records in it.
Sno, Sname, Sadd
50. What is the difference between Close#1 & Close?
51. What is run time property and design time property?
52. What are 3 control types in V.B.?
53. Explain any 3 mouse events.
54. Explain any 3 key press events.
55. Write a program to display what key is pressed from keyboard.
56. Write a program to change a value of text box by Hscrollbar.
57. Write a code to check whether all text boxes are filled or not.
58. Write a program to accept only string or character values from keyboard. Only
numeric value in 2 different text boxes.
59. Write following values constants in message box.
60. State the order in which form events generally trigerred.
61. What is data combo control how is it different from the combo box control?
62. Write code to disable all the text box and command button controls on the form.
63. How can you enable the user to access a menu item from the keyboard?
64. What is .ocx and when it is created?
65. Which are the important built-in events that class support?
66. Explain the following code:
If anydate = empty then exit sub
If anydate < now then
anydate = now
timer1.enabled = False
End If
End Sub
67. How to insert tooltip to a control toolbar button at design time?
68. List the different steps in creating an error handler?
69. What is debug.print and its use?
70. List the different types of error?
71. What is .vbd file?
72. Explain any four debugging tools?
73. What is use of F8 and Shift+F8?
74. Explain Refresh method?
75. Explain the data control count property?


Topic: Introduction to Visual Basic

1. What are objects and properties? How are they related? (4)
2. What are the steps involved in planning and creating a VB project? (6)
3. What is the purpose of the name property of any control? (4)
4. Describe about the general declaration section of a form module? (4)
5. What are the different types of errors and how are they caused? (8)
6. What do you mean by context-sensitive Help menu? How can you use it? (6)
7. What are the different modes that are available in VB? (6)

Topic: More VB Controls

1. What is the difference between an option button and a check box control? (6)
2. How can you make groups of option buttons? Explain. (8)
3. What do you mean by access keys? Why are they used? (6)
4. What is atooltip? How can you make it to appear? (4)
5. How can you change the labels’ caption during the design time and during the
runtime? (4)
6. Explain With block with an example. (8)
7. What is the purpose of image control and how can it be created? (6)
8. What is concatenation and when can it be used? (4)
9. What is the continuation operator? When is it used? (4)
Topic: Variables, Constants and calculations.

1. Name and give the purpose of five data types that are available in VB? (8)
2. What do you mean by declaration of a variable? Explain with proper
Syntax? (6)
3. Give the difference between a variable and a constant. (4)
4. What is the purpose of a Val function? (4)
5. Explain in detail about the various functions used for formatting the data? (8)
6. What are the arithmetic operators used in VB? What do you mean by Order of
precedence. (6)
7. Explain in detail about the scope of a variable. (8)
8. What are the naming rules and conventions that we follow to declare a
variable? (6)

Topic: Decisions and conditions.

1. What is the general format of the statement used to code decisions in an

application? (6)
2. What are different types of operators do we have in VB? Explain each with an
example? (6)
3. How does VB compare the text property of a text box? (6)
4. Explain a Boolean variable test for true and false. Give an example (4)
5. What do you mean by Nested Ifs?(6)
6. When would you use a message box? (4)

Topic Menus, submenus, Procedures, Functions

1. Explain the various parts in the menu editor? (8)

2. What is a separator bar how is it created in a menu? (4)
3. What do you mean by common dialog box? Explain its methods (8)
4. What do you mean by event procedure? (6)
5. What is the difference between a procedure and function? (6)
6. What is a return value? How can it be used? (4)
7. Explain the difference between VyRef and ByVal? Explain with ex? (6)

Topic: Multiple forms

1. What do you mean by multiple forms? (4)

2. What do you mean by Hide and Show form methods? Give the syntax. (4)
3. What is the difference between form load and form activate events? (6)
4. What is the difference between hide and unload form methods? (4)
5. How will you refer the objects on a different form? (4)

Topic: Lists, Loops and Printing

1. What is a list box? (4)

2. What is a combo box? What are its types? (6)
3. What is the difference between a list box and a combo box? (6)
4. Write short notes on listindex and listcount property? (4)
5. What are Loops? Explain with syntax and example about the various Do
Loops. (8)
6. What are the steps in processing a for next loop? Explain with examples
7. What is the purpose of printer. Print? (4)
8. How do the left, right and Len functions Operate? (6)

Topic Arrays.

1. What do you mean by an array. Explain with syntax? (6)

2. What is a subscript? What role does it play in a VB application.(4)
3. What is control array? Where is it used? (6)
4. What is a multi-dimensional array? (4)
5. How are list boxes used along with arrays? (6)

Topic: OOP-Creating object oriented Programs.

1. What do you mean by an object? How will you instantiate an object? (6)
2. What is the difference between properties and methods? (4)
3. What are the various features of object oriented terminology? (8)
4. Define data hiding. (4)
5. Define encapsulation. (4)
6. What do you mean by Reusable objects? (4)
7. What actions trigger the initialize and terminate events of an object?
8. What is a class? (6)
9. What steps are needed to assign property value to an object? (6)
10. How will you create a new object using a class? (6)
11. Differentiate early binding and late binding. (8)
12. How can you write methods for a new class? (6)
13. Why do you need to terminate a project (4)

Topic: Data Files

1. What is the difference between a VB Project file and data file? (4)
2. Explain what happens when an open statement is executed? (6)
3. List and explain the file modes for data files. (6)
4. What is the significance of a file number (4)
5. Explain the difference between outputs and append mode. (4)
6. What is the format for the statements to read and write sequential file. (6)
7. What function can be used to determine an available file number? (4)
8. When would an On Error statement be used? (6)
9. Explain the function and use of Err object. (6)
10. What does updating a datafile mean? (6)
11. Explain about the seek function. (6)
12. Explain LOF function. (4)
13. What is the difference between a random and a sequential file? (6)
14. Explain Get statement and Put statement. (4)
15. Explain the form-query Unload procedure with an example. (6)
16. Explain the Resume statement. (4)

Topic: Accessing database files.

1. Explain the difference between a data control and data bound control. (6)
2. Which controls can be data bound why? (4)
3. Explain how the BOF and EOF properties are set and how they might be
used in a project. (6)
4. Which properties must be set to bind a combo box to a field in a database
and display a dropdown list of the choice for that field. (4)
5. How will you update a database file? (6)
6. What steps are needed to add a record to a database? (4)
7. What steps are needed to delete a record from a database? (4)
8. What steps are needed to change a record to in a database record? (4)
9. How can you check for the user deleting the only record in a record set?

Topic: Advanced data handling

1. What is grid control? How will you create it? (8)

2. What is the purpose of record count and absolute position properties? (4)
3. How will you open a database in the form load event? (4)
4. \What do you mean by error trapping? How is it possible? (6)
5. Explain validate event with an example. (6)
6. What is a record set? What are its types? Explain. (8)
7. What are the methods that are available to search for a particular record in
a record set? (8)
8. Write short notes on Seek method. (6)
9. How will you suppress system error messages? (4)
10. What is SQL? How is it used in VB? (6)
11. How will you create a new dynaset using SQL statements? Give some
examples. (6)
12. For which type of record set is a seek method valid? Which fields in
record set can be searched with seek. (4)
Question Papers of Some Colleges

S.I.E.S. College of Commerce, & Economics

Sion (E), Mumbai

Preliminary Examination, V Semester

Subject : Visual Basic Max Marks :

Class : TYBSc(IT) Date : Time : 3

N.B :- 1) Q1 is compulsory.
2) Solve any four from the remaining six
2) Figures to the right indicate full marks.
3) Assume suitable data wherever necessary.

A Differentiate between Variables & constants. (03)
Give Examples.
B Write the necessary code to produce a color (04)
dialog box to change the background color of
a command button.
C What is the difference between a VB Project (03)
file and data file?
D Explain the utility of the following functions (04)
with examples
i) Mid ii) IsNumeric
E What is the significance of a file number (03)
F Explain the use of the Print method of print class. (03)

Q A Are user defined procedures supported by (07)

2 Visual Basic? If yes, discuss how they can be
defined and called with an example.
B Write the code for the following application (06)
An application for a store which deals with
only three commodities. Any user coming to
the store buys at least buys one item. Every
item is available in three packages(by
weight). After purchasing, the application
should be able to print a bill in the following

ABC Supermarket
ITEM Rate Qty Price
ABC 10.00 2 20.00

Total : 20

C Explain some methods to debug a VB


Q A Write a program to display the age of a (06)

3 person if his date of birth is entered. Use
suitable ActiveX controls and events.
B Explain the difference between : (06)
#Input & #Output.
#Get & #Write.
C Explain the concept of Control Arrays. Write a (2+
VB application for performing mathematical 6)
operations (Addition, Subtraction, Division &
Multiplication) on numbers in the range 1-5.

Q A Explain the events that are fired when a user presses any key from (06)
4 the keyboard. Give an example for each.
B Discuss the general structure of a FOR Loop (04)
with an example.
C Are menus ina VB application accessible (04)
through the keyboard ? If yes, explain how?
D Code a VB application which facilitates storing (06)
the items in a list box in a file. It should also
have the feature of adding items in the list
box at run time such that they are inserted in
the file.
Q A Explain the concept of Random files in Visual (07)
5 Basic. How can u delete a record from a
random file.
B Discuss the use of the following functions with (06)
i) Seek ii) FormatNumber
iii) LTrim
C Write a VB application to calculate the (07)
interest earned on a fixed deposit as per the
following specifications.
a) The user should enter the Principal
amount, rate of Interest and period of
the deposit( in months) .
b) The user should be able to select the
option of payment of interest as
Monthly, quarterly, yearly or to be paid
after maturity of the deposit.
c) The deposit should be for a minimum of
6 months duration.

Q A Explain the concept of Recordsets, Dynasets (06)

6 and Snapshots.
B What are types ? How are they declared and (06)
accessed ? Give examples.

C List different types of operators available in (07)

Visual Basic. Explain each of them.

Q A Discuss the concept of Late and Early Binding. (04)

B Describe the se of Class_initialise and (06)
Class_Terminate events. Give examples.
C Explain with examples different error handling (06)
methods in Visual Basic.
D Code a VB application to retrive, add and
delete records from an Access database. Use
suitable Controls, events, properties and
methods. Apply proper validations.
SIWS College
Time : 3 Hrs. Max Marks : 100
Note : Question 1 is Compulsory. Attempt any 5 out of remaining.
Form Design Diagram is necessary for Programs.

Q.1) Write Short Notes on : (Any 4) [20]

I) Naming rules and conventions for Variables
II) Common Dialog box
III) Event Driven Language
IV) Arithmetic and Logical Operators
V) Validate and Reposition Events
VI) Control Arrays

Q.2) A) Explain the following controls with any 2 properties and [10]
Events :
I) Textbox II) Image

B) Create an application that will accept name, quantity price [6]

and discount for different products and calculate the net
amount. (use appropriate validations)

Q.3) A) Explain the different types of procedures. [6]

B) Explain the working of Val function. [4]

C) Create an application that will the information of an [6]

employee and store in an array. Use a list box to store the
names and display the details when user clicks on the name.

Q.4) A) Explain the following options of the menu editor : [6]

I) Index II) Enabled and Visible III) Menu Listbox

B) Explain the Default and Cancel properties in detail. [4]

C) Create an application that will Clear the Textboxes and set

the selected property of Listbox and Option buttons to 0
through a procedure in standard code module.

Q.5) A) Differentiate between : [6]

I) Standard code and Form code module
II) Static and Global Variables
III) Random and Sequential Files
B) Explain the user defined Data types in V.B. [4]

C) Create an application that will create a class Student to [6]

store Roll no, name and marks of 3 subjects and write a
method to calculate the percentage.


Q.6) A) Explain the following properties and Methods of a Combobox : [8]

I) Style
II) ItemData
III) ListIndex and NewIndex
IV) AddItem

B) Create an application that will create a Data file and Store [8]
the names and phone numbers. Copy the contents in another
file when user clicks on BACKUP button.

Q.7) A) Explain the use of following functions : [6]

I) Open II) LOF III) FreeFile

B) Explain the use of Message Box. [4]

C) Create an application that will Accept data of book and [6]

store in a database file. Provide navigation buttons for
display of records.
(Use Error trapping code and set the properties of data
control during run time.)

Q.8) A) Explain the different types of Recordsets. [6]

B) What are Data bound controls? Explain with example. [4]

C) Create an application that will search for a record in a [6]

table type of record set and delete the record. Give a
prompt for confirmation of deletion.

The next set of questions will be sent in a day or two with question papers of some more