You are on page 1of 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 tet bo that are used to bind it to a record set
object?
!. "dentify the 3 types of property procedures # state when would you use them.
$. "dentify the built in events for class modules # eplain custom events.
%. &plain the process for using a class module in an application.
'. &plain early and late binding # the effect of each on the performance of an
application.
(. &plain how to create controls at run time.
1). *iscuss control collection in +.,. including its properties- uses # how to create it.
11. &plain how to create a menu # menu item at run time?.
12. &plain the concept of validation.
13. What does the immediate window allow you to do while debugging?
14. .ow can setting the brea/ when value is true option for a watch help you to debug
your code?
1!. What are the 2 properties of the error object that can be useful in determining the
cause at an error within an error handler?
1$. What are stored procedures # how they benefit your application?
1%. What is a cursor ? What 2 locations can cursor eists?
1'. &plain concept collection instead of array.
1(. What is the difference between function call by value # call by reference?
2). What is the difference between class module # standard module?
21. &plain the following 0
i. 1lipboard
ii. 1om
iii. 1ontrol array
iv. *ialog bo
v. &vent driven
vi. &vent procedure
vii. &vent trapping
viii. 2rocedure call with argument
i. 3*" # 4*"
. +alidation rule
2. &plain any ! data types.
3. &plain the concept of message bo.
4. &plain the difference between chec/ bo # option button.
!. When do we use combo bo # list bo?
$. &plain any 3 format date # time function.
%. &plain the difference between lost focus- got focus # set focus.
'. &plain the declaration statement.
(. &plain the concept of variable scope.
1). &plain the difference between 0
a. 5"nput # 56utput.
b. 57et # 5Write.
11. .ow to decide when to use a random file mode # append mode?
12. .ow to create dynamic array of user defined data type?
&plain with following eample0
1reate &mp data type
&no
&name
&sal.
13. &plain the collection property with synta.
14. &plain the concept of initiali8e # terminate event at class.
1!. &plain ,69- :69 # &69.
1$. &plain the concept of date bound.
1%. &plain the 3 steps of debugging.
1'. Write program to add new record- find record- display previous record # last
record.
1(. &plain any 3 print methods.
2). &plain the concept of ;ctive<= 1ontrol.
21. .ow to use input bo to randomly retrieve the records?
22. &plain the concept of record set.
23. What the use of nomatch property?
24. &plain the difference between find # see/.
2!. &plain the concept of trapping database errors.
2$. What is database field # vbfield?
2%. What are dynasets # snapshots?
2'. .ow to change enable # disable # caption property of a button at run time?
2(. &plain the difference between static # constant.
3). &plain hoe to search data from list using do loop.
31. &plain all form events in se>uence.
32. Write code for cut- copy # paste of selected tet.
33. &plain any ! string functions with synta.
34. &plain any ! mathematical functions with synta.
3!. &plain the prefi concept with suitable eample.
3$. &plain any 2 types of errors.
3%. Write a program to display the no of years difference after entering the date of
birth.
3'. &plain the use of timer control.
3(. write a program to add item- remove item # sort the list. ;lso search the data
items from that.
4). &plain activate # deactivate event of form.
41. What is the difference between load # show form?
42. &plain the spc # tab function.
43. 1reate 23? function # call that in command button. *isplay all values in
different tet boes.
44. What is general procedure # function procedure?
4!. Write a program to calculate discount using option button # display grass total #
net total.
2!@ 7ross ;mt
2)@ Aet ;mt
1)@ *iscount ;mt
4$. Write a program using 2 dimensional array student rollno. # 2 subject mar/s.
*isplay0
Bollno
4ub1
4ub2
?otal
4%. &plain the graphic method.
4'. Write a program using list bo. 4elect the drawing object # draw the selected
object in picture bo.
4(. Write a program to open a file. ;dd the following records in it.
4no- 4name- 4add
!). What is the difference between 1lose51 # 1lose?
!1. What is run time property and design time property?
!2. What are 3 control types in +.,.?
!3. &plain any 3 mouse events.
!4. &plain any 3 /ey press events.
!!. Write a program to display what /ey is pressed from /eyboard.
!$. Write a program to change a value of tet bo by .scrollbar.
!%. Write a code to chec/ whether all tet boes are filled or not.
!'. Write a program to accept only string or character values from /eyboard. 6nly
numeric value in 2 different tet boes.
!(. Write following values constants in message bo.
)-1$-32-4'-$4
$). 4tate the order in which form events generally trigerred.
$1. What is data combo control how is it different from the combo bo control?
$2. Write code to disable all the tet bo and command button controls on the form.
$3. .ow can you enable the user to access a menu item from the /eyboard?
$4. What is .oc and when it is created?
$!. Which are the important built<in events that class support?
$$. &plain the following code0
1mdCtestCclic/DE
"f anydate F empty then eit sub
"f anydate G now then
anydate F now
timer1.enabled F 9alse
&nd "f
&nd 4ub
$%. .ow to insert tooltip to a control toolbar button at design time?
$'. :ist the different steps in creating an error handler?
$(. What is debug.print and its use?
%). :ist the different types of error?
%1. What is .vbd file?
%2. &plain any four debugging tools?
%3. What is use of 9' and 4hiftH9'?
%4. &plain Befresh method?
%!. &plain the data control count property?
4&? ""
Topic: Introduction to Visual Basic
1. What are objects and properties? .ow are they related? (4)
2. What are the steps involved in planning and creating a +, project? (6)
3. What is the purpose of the name property of any control? (4)
4. *escribe about the general declaration section of a form module? (4)
!. What are the different types of errors and how are they caused? (8)
$. What do you mean by contet<sensitive .elp menu? .ow can you use it? (6)
%. What are the different modes that are available in +,? (6)
Topic: More VB Controls
1. What is the difference between an option button and a chec/ bo control? D6)
2. .ow can you ma/e groups of option buttons? &plain. (8)
3. What do you mean by access /eys? Why are they used? D6)
4. What is atooltip? .ow can you ma/e it to appear? (4)
!. .ow can you change the labelsI caption during the design time and during the
runtime? (4)
$. &plain With bloc/ with an eample. (8)
%. What is the purpose of image control and how can it be created? (6)
'. What is concatenation and when can it be used? (4)
(. What is the continuation operator? When is it used? (4)
Topic: Variables, Constants and calculations.
1. Aame and give the purpose of five data types that are available in +,? D8)
2. What do you mean by declaration of a variable? &plain with proper
4ynta? (6)
3. 7ive the difference between a variable and a constant. (4)
4. What is the purpose of a +al function? (4)
!. &plain in detail about the various functions used for formatting the data? (8)
$. What are the arithmetic operators used in +,? What do you mean by 6rder of
precedence. (6)
%. &plain in detail about the scope of a variable. (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 +,? &plain each with an
eample? (6)
3. .ow does +, compare the tet property of a tet bo? (6)
4. &plain a ,oolean variable test for true and false. 7ive an eample (4)
!. What do you mean by Aested "fs?(6)
$. When would you use a message bo? (4)
Topic Menus, subenus, !rocedures, "unctions
1. &plain 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 bo? &plain its methods (8)
4. What do you mean by event procedure? (6)
!. What is the difference between a procedure and function? (6)
$. What is a return value? .ow can it be used? D4)
%. &plain the difference between +yBef and ,y+al? &plain with e? (6)
Topic: Multiple forms
1. What do you mean by multiple forms? (4)
2. What do you mean by .ide and 4how form methods? 7ive the synta. (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)
!. .ow will you refer the objects on a different form? (4)
Topic: Lists, Loops and Printing
1. What is a list bo? D4E
2. What is a combo bo? What are its types? (6)
3. What is the difference between a list bo and a combo bo? (6)
4. Write short notes on listinde and listcount property? (4)
!. What are :oops? &plain with synta and eample about the various *o
:oops. (8)
$. What are the steps in processing a for net loop? &plain with eamples
(6)
%. What is the purpose of printer. 2rint? (4)
'. .ow do the left- right and :en functions 6perate? (6)
Topic Arrays.
1. What do you mean by an array. &plain with synta? (6)
2. What is a subscript? What role does it play in a +, application.(4)
3. What is control array? Where is it used? (6)
4. What is a multi<dimensional array? (4)
!. .ow are list boes used along with arrays? (6)
Topic: OOPCreating ob!ect oriented Programs.
1. What do you mean by an object? .ow 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? D8)
4. *efine data hiding. (4)
!. *efine encapsulation. (4)
$. What do you mean by Beusable objects? (4)
%. What actions trigger the initiali8e and terminate events of an object?
'. What is a class? (6)
(. What steps are needed to assign property value to an object? (6)
1). .ow will you create a new object using a class? (6)
11. *ifferentiate early binding and late binding. (8)
12. .ow can you write methods for a new class? (6)
13. Why do you need to terminate a project (4)
Topic: #ata "iles
1. What is the difference between a +, 2roject file and data file? (4)
2. &plain what happens when an open statement is eecuted? (6)
3. :ist and eplain the file modes for data files. (6)
4. What is the significance of a file number (4)
!. &plain the difference between outputs and append mode. (4)
$. What is the format for the statements to read and write se>uential file. (6)
%. What function can be used to determine an available file number? (4)
'. When would an 6n &rror statement be used? (6)
(. &plain the function and use of &rr object. (6)
1). What does updating a datafile mean? (6)
11. &plain about the see/ function. (6)
12. &plain :69 function. (4)
13. What is the difference between a random and a se>uential file? (6)
14. &plain 7et statement and 2ut statement. (4)
1!. &plain the form<>uery Jnload procedure with an eample. (6)
1$. &plain the Besume statement. (4)
Topic: Accessing database files.
1. &plain the difference between a data control and data bound control. (6)
2. Which controls can be data bound why? (4)
3. &plain how the ,69 and &69 properties are set and how they might be
used in a project. (6)
4. Which properties must be set to bind a combo bo to a field in a database
and display a dropdown list of the choice for that field. (4)
!. .ow will you update a database file? (6)
$. What steps are needed to add a record to a database? (4)
%. What steps are needed to delete a record from a database? (4)
'. What steps are needed to change a record to in a database record? (4)
(. .ow can you chec/ for the user deleting the only record in a record set?
(4)
Topic: $d%anced data &andlin'
1. What is grid control? .ow will you create it? (8)
2. What is the purpose of record count and absolute position properties? (4)
3. .ow will you open a database in the form load event? (4)
4. KWhat do you mean by error trapping? .ow is it possible? (6)
!. &plain validate event with an eample. (6)
$. What is a record set? What are its types? &plain. (8)
%. What are the methods that are available to search for a particular record in
a record set? (8)
'. Write short notes on 4ee/ method. (6)
(. .ow will you suppress system error messages( (4)
1). What is 4L:? .ow is it used in +,? (6)
11. .ow will you create a new dynaset using 4L: statements? 7ive some
eamples. (6)
12. 9or which type of record set is a see/ method valid? Which fields in
record set can be searched with see/. (4)
Question !apers of )oe Colle'es
S.I.E.S. College of Commerce, & Economics
Sion (E), Mumbai
Preliminary Examination, V Semester
Subject : Visual Basic Max Marks :
100
Class : TYBSc(IT) Date : Time : 3
Hurs
!"B :# 1) $1 is cm%ulsr&"
') Sl(e a)& *ur *rm t+e remai)i), six
-uesti)s"
') .i,ures t t+e ri,+t i)/icate *ull marks"
3) 0ssume suitable /ata 1+ere(er )ecessar&"
$
1
0 Di2ere)tiate bet1ee) Variables 3 c)sta)ts"
4i(e 5xam%les"
(03)
B 6rite t+e )ecessar& c/e t %r/uce a clr
/ial, bx t c+a),e t+e back,ru)/ clr *
a cmma)/ butt)"
(07)
C 6+at is t+e /i2ere)ce bet1ee) a VB 8rject
9le a)/ /ata 9le:
(03)
D 5x%lai) t+e utilit& * t+e *ll1i), *u)cti)s
1it+ exam%les
i) Mi/ ii) Is!umeric
(07)
5
*&at is t&e si'nificance of a file nuber
(03)
.
+,plain t&e use of t&e !rint et&od of print class-
(03)
$
'
0 0re user /e9)e/ %rce/ures su%%rte/ b&
Visual Basic: I* &es; /iscuss +1 t+e& ca) be
/e9)e/ a)/ calle/ 1it+ a) exam%le"
(0<)
B 6rite t+e c/e *r t+e *ll1i), a%%licati)
0) a%%licati) *r a stre 1+ic+ /eals 1it+
)l& t+ree cmm/ities" 0)& user cmi), t
(0=)
t+e stre bu&s at least bu&s )e item" 5(er&
item is a(ailable i) t+ree %acka,es(b&
1ei,+t)" 0*ter %urc+asi),; t+e a%%licati)
s+ul/ be able t %ri)t a bill i) t+e *ll1i),
*rmat:
0BC Su%ermarket
Date : MM>DD>YYYY
IT5M ?ate $t& 8rice
0BC 10"00 ' '0"00
Ttal : '0
C 5x%lai) sme met+/s t /ebu, a VB
a%%licati)"
$
3
0 6rite a %r,ram t /is%la& t+e a,e * a
%ers) i* +is /ate * birt+ is e)tere/" @se
suitable 0cti(eA c)trls a)/ e(e)ts"
(0=)
B 5x%lai) t+e /i2ere)ce bet1ee) :
BI)%ut 3 BCut%ut"
B4et 3 B6rite"
(0=)
C 5x%lai) t+e c)ce%t * C)trl 0rra&s" 6rite
a VB a%%licati) *r %er*rmi),
mat+ematical %erati)s (0//iti);
Subtracti); Di(isi) 3 Multi%licati)) )
)umbers i) t+e ra),e 1#D"
('E
=)
$
7
0
&plain the events that are fired when a user presses any /ey from
the /eyboard. 7ive an eample for each.
(0=)
B Discuss t+e ,e)eral structure * a .C? F%
1it+ a) exam%le"
(07)
C 0re me)us i)a VB a%%licati) accessible
t+ru,+ t+e ke&bar/ : I* &es; ex%lai) +1:
(07)
D C/e a VB a%%licati) 1+ic+ *acilitates
stri), t+e items i) a list bx i) a 9le" It
s+ul/ als +a(e t+e *eature * a//i), items
i) t+e list bx at ru) time suc+ t+at t+e& are
(0=)
i)serte/ i) t+e 9le"
$
D
0 5x%lai) t+e c)ce%t * ?a)/m 9les i) Visual
Basic" H1 ca) u /elete a recr/ *rm a
ra)/m 9le"
(0<)
B Discuss t+e use * t+e *ll1i), *u)cti)s
1it+ exam%les
i) Seek ii) .rmat!umber
iii) FTrim
(0=)
C 6rite a VB a%%licati) t calculate t+e
i)terest ear)e/ ) a 9xe/ /e%sit as %er t+e
*ll1i), s%eci9cati)s"
a) T+e user s+ul/ e)ter t+e 8ri)ci%al
amu)t; rate * I)terest a)/ %eri/ *
t+e /e%sit( i) m)t+s) "
b) T+e user s+ul/ be able t select t+e
%ti) * %a&me)t * i)terest as
M)t+l&; -uarterl&; &earl& r t be %ai/
a*ter maturit& * t+e /e%sit"
c) T+e /e%sit s+ul/ be *r a mi)imum *
= m)t+s /urati)"
(0<)
$
=
0 5x%lai) t+e c)ce%t * ?ecr/sets; D&)asets
a)/ S)a%s+ts"
(0=)
B 6+at are t&%es : H1 are t+e& /eclare/ a)/
accesse/ : 4i(e exam%les"
(0=)
C Fist /i2ere)t t&%es * %eratrs a(ailable i)
Visual Basic" 5x%lai) eac+ * t+em"
(0<)
$
<
0 Discuss t+e c)ce%t * Fate a)/ 5arl&
Bi)/i),"
(07)
B Describe t+e se * ClassGi)itialise a)/
ClassGTermi)ate e(e)ts" 4i(e exam%les"
(0=)
C 5x%lai) 1it+ exam%les /i2ere)t errr
+a)/li), met+/s i) Visual Basic"
(0=)
D C/e a VB a%%licati) t retri(e; a// a)/
/elete recr/s *rm a) 0ccess /atabase" @se
suitable C)trls; e(e)ts; %r%erties a)/
met+/s" 0%%l& %r%er (ali/ati)s"

)I*) Colle'e
Time : 3 Hrs. Max Marks : 100
Note : Question 1 is Compulsory. Attempt any 5 out of remaining.
orm !esign !iagram is ne"essary for #rograms.
Q.1$ %rite &'ort Notes on : (Any )$ *+0,
-$ Naming rules an. "on/entions for 0aria1les
--$ Common !ialog 1ox
---$ 2/ent !ri/en 3anguage
-0$ Arit'meti" an. 3ogi"al 4perators
0$ 0ali.ate an. 5eposition 2/ents
0-$ Control Arrays
Q.+$ A$ 2xplain t'e follo6ing "ontrols 6it' any + properties an.
2/ents :
-$ Text1ox --$ -mage
*10,
7$ Create an appli"ation t'at 6ill a""ept name8 9uantity pri"e
an. .is"ount for .ifferent pro.u"ts an. "al"ulate t'e net
amount. (use appropriate /ali.ations$
*:,
Q.3$ A$ 2xplain t'e .ifferent types of pro"e.ures. *:,
7$ 2xplain t'e 6orking of 0al fun"tion. *),
C$ Create an appli"ation t'at 6ill t'e information of an
employee an. store in an array. ;se a list 1ox to store t'e
names an. .isplay t'e .etails 6'en user "li"ks on t'e name.
*:,
Q.)$ A$ 2xplain t'e follo6ing options of t'e menu e.itor :
-$ -n.ex --$ 2na1le. an. 0isi1le ---$ Menu 3ist1ox
*:,
7$ 2xplain t'e !efault an. Can"el properties in .etail. *),
C$ Create an appli"ation t'at 6ill Clear t'e Text1oxes an. set
t'e sele"te. property of 3ist1ox an. 4ption 1uttons to 0
t'roug' a pro"e.ure in stan.ar. "o.e mo.ule.
Q.5$ A$ !ifferentiate 1et6een :
-$ &tan.ar. "o.e an. orm "o.e mo.ule
--$ &tati" an. <lo1al 0aria1les
---$ 5an.om an. &e9uential iles
*:,
7$ 2xplain t'e user .efine. !ata types in 0.7. *),
C$ Create an appli"ation t'at 6ill "reate a "lass &tu.ent to
store 5oll no8 name an. marks of 3 su1=e"ts an. 6rite a
met'o. to "al"ulate t'e per"entage.

*:,
#.T.4.
Q.:$ A$ 2xplain t'e follo6ing properties an. Met'o.s of a Com1o1ox :
-$ &tyle
--$ -tem!ata
---$ 3ist-n.ex an. Ne6-n.ex
-0$ A..-tem

*>,
7$ Create an appli"ation t'at 6ill "reate a !ata file an. &tore
t'e names an. p'one num1ers. Copy t'e "ontents in anot'er
file 6'en user "li"ks on 7AC?;# 1utton.

*>,
Q.@$ A$ 2xplain t'e use of follo6ing fun"tions :
-$ 4pen --$ 34 ---$ reeile
*:,
7$ 2xplain t'e use of Message 7ox. *),
C$ Create an appli"ation t'at 6ill A""ept .ata of 1ook an.
store in a .ata1ase file. #ro/i.e na/igation 1uttons for
.isplay of re"or.s.
(;se 2rror trapping "o.e an. set t'e properties of .ata
"ontrol .uring run time.$
*:,
Q.>$ A$ 2xplain t'e .ifferent types of 5e"or.sets. *:,
7$ %'at are !ata 1oun. "ontrolsA 2xplain 6it' example. *),
C$ Create an appli"ation t'at 6ill sear"' for a re"or. in a
ta1le type of re"or. set an. .elete t'e re"or.. <i/e a
prompt for "onfirmation of .eletion.
*:,
?he net set of >uestions will be sent in a day or two with >uestion papers of some more
colleges.

You might also like