Thursday, November 22, 2007
Question Bank-2
1. Which event is triggered when the user moves to another open form?
a. QueryUnload
b. Deactivate
c. Terminate
d. Load
e. Initialize
2. Which event of an ActiveX control data provider runs every time a bound control extracts adata through the provider?
a. GetDataMember
b. GetDataField
c. GetDataProperty
d. GetDataRow
3. Which of the following are not properties of Command Button:
a. Caption
b. Visible
c. Font
d. Bold
4. You are creating an ActiveX component that raises user-defined errors. Which of the following statements correctly raises an error to the client with error number 20000?
a. Err.Raise vbObjectError + 20000
b. Err.Raise 20000
c. Err.Raise vbObjectError,20000
d. Error.Raise vbObjectError + 20000
5. Which events enable you to determine which key was pressed by the user?
a. Click, KeyUp and KeyDown
b. KeyUp and KeyDown
c. KeyPress, KeyUp and KeyDown
d. Click, KeyPress, KeyUp and KeyDown
6. In order to access a file in Non-textual format, you have to open file in:
a. Ascii Format
b. Binary Format
c. Input Mode
d. Output mode
7. Visual Basic displays information depending upon the current value of two properties of the form, called:
a. CurrentX and CurrentY
b. ScaleLeft and ScaleTop
c. ScaleHeight and ScaleTop
d. LeftX and LeftY
8. Which of the following procedure types will execute when you assign a value to a property of an object?
a. Property Get
b. Property Assign
c. Property Let
d. Property Set
9. In order to overlap the controls (say a command button) during design time, we use the ‘Send To Back’ or ‘Bring To Front’ option from the Edit menu. To change it dynamically (i.e.during program execution) we need to change:
a. Background color property
b. Caption property
c. ZOrder property
d. AutoRedraw property
e. SendtoBack property
10. Name the only property supported by a collection?
a. Name
b. Index
c. Count
d. Type
e. Value
11. Which of the following situations would not cause the Initialize event of an ActiveX control to occur?
a. When a control is placed on a form at design time
b. When a form designer containing a control is closed
c. When a form is run
d. When a compiled application containing a control executes
12. Which event occurs only once in the entire life cycle of an ActiveX control?
a. Initialize
b. Resize
c. Terminate
d. WriteProperties
13. You are creating an ActiveX component that raises user-defined errors. What is the valid range of error numbers that you can use for user-defined errors?
a. 1-1000
b. 1-65535
c. 0-1000
d. 513-65535
e. 10000-20000
14. Which property of the Progress Bar determines how much of the bar is filled?
a. Min
b. Max
c. Value
d. CurrentVal
15. The ______ function can be used to run any .com, .exe, .bat or .pif file from a Visual Basic program.
a. Shell
b. Substr
c. SetAttr
d. CStr
e. Exec
16. One can convert a Visual Basic Application into ActiveX Document using:
a. Visual Database Manager
b. Application Wizard
c. ActiveX Document Migration Wizard
d. Package and Deployment Wizard
17. The caption and the name properties of the command button:
a. Are one and the same
b. Can be different at times
c. Are actually not properties
18. You try to initialize a new Object variable with the following line but receive an error. What could be the possible cause?Set MyVar = New Classname
a. You do not need to use the Set command here
b. You do not have the permission to access the class
c. MyVar has not been declared
d. You do not need to use the New keyword here
19. Which of the following will perform a direct execution of a Command object?
a. The ExecDirect method
b. The Open method
c. The Exec method
d. The ExecProcedure method
e. None of the above
20. The vbCritical symbol displays:
a. A warning query icon
b. A critical message icon
c. A warning message icon
d. An exclamation icon
e. None of the above
21. What does the forms collection contain?
a. A list of all forms in a project
b. A list of all hidden forms
c. A list of all currently loaded forms
d. A list of all visible forms
e. All the child forms of an MDI application
22. Which method of the Record set object should you use to navigate multiple record sets returned by a stored procedure?
a. NewRecordset
b. NavigateRecordset
c. OpenNextRecordset
d. NextRecordset
e. SkipRecordset
f. JumpRecordset
23. Which of the following cannot be included in the Open method of the recordset?
a. Cursor Type
b. User Name
c. Active Connection
d. CursorLocation
e. LockType
24. The settings for the Color properties in Visual Basic are indicated by:
a. Decimal Coding
b. Octal Coding
c. Hexadecimal Coding
d. Binary Coding
25. What you must do before you make calls to an ActiveX DLL project in the same Project Group?
a. Compile the DLL
b. Check the DLL off in your project’s Reference List
c. Make sure the DLL is the Startup Project
d. Ensure that a Standard Exe form is included and is made the Startup Form.
26. The _______ property changes the tab order at runtime:
a. Tab stop
b. Tab key
c. Tab order
d. Tab index
27. What do CurrentX and CurrentY return?
a. Current X and Y co-ordinates of mousepointer
b. Current X and Y co-ordinates of cursor
c. A String of X & Y
d. Current x and y co-ordinates of the control
28. The Kill command in Visual Basic is used for:
a. Stopping the current process
b. Deleting files
c. Terminating the application
d. Stopping the current thread
e. Debugging the application
29. If one needs to use an ampersand (&) in a Label but does not want it to be an Access Key, the _______ property of the label must be set to False.
a. Caption
b. ClipControls
c. UseMnemonic
d. LinkMode
e. Locked
30. Which of the following is the only drag related event?
a. DragEnter
b. DragLeave
c. DragStart
d. DragStop
e. DragDrop
31. Which property of the form changes the form’s title?
a. Name
b. Heading
c. Title
d. Caption
e. Logo
32. Labels do not respond to _____ and ______ events.
a. Got_Focus, Lost_Focus
b. Click, DblClick
c. Dragdrop, OLECompleteDrag
d. Change, Link Error
33. Which of the following statements is capable of abandoning a series of modifications made to a recordset locked with a BatchOptimistic lock?
a. CancelUpdate
b. CancelBatch
c. CancelBatchUpdate
d. AbandonBatch
e. AbandonBatchUpdate
34. Which three methods does the collection object support?
a. Let, Get, Set
b. Load, Unload, Count
c. Add, Remove, Item
d. Add, Delete, Index
e. Add, Remove, Count
f. Add, Delete, Count
35. Which line of code listed here can be used to create a string of fixed length:
a. Dim strFirstName as String
b. strFirstName * 255
c. strFirstName = 255
d. Dim strFirstName as String(255)
e. None of the above
36. Consider the following program code:
(i) Dim FileName as String
Open FileName For Input As #FreeFile
(ii) Dim FileName as String
FileNum = FreeFile
Open FileName For Input As #FileNum
a. Both (i) and (ii) are correct
b. Only (i) is correct
c. Only (ii) is correct
d. (i) contains a logical error
e. (ii) contains an error
f. Both (i) and (ii) contain errors
37. Which property of the Err object returns the numeric value associated with the most recent runtime error?
a. No
b. Number
c. Source
d. Num
e. Code
38. In Visual Basic, which method can you use to send key strokes to other Window applications?
a. AppActivate
b. SendKeys
c. Copying the contents from the ClipBoard & pasting
d. Manually typing in the other application’s Window
39. The ______ property is used to show Tool Tips or Help Balloons when the mouse rests on the object:
a. ToolTipText
b. Dragmode
c. ShowTips
d. Tip
e. ShowHelp
40. What is the sequence in which the following events are triggered when a form is loaded?
a. Initialize, Load, Resize and Paint
b. Initialize, Load, Paint and Resize
c. Load, Initialize, Resize and Paint
d. Load, Initialize, Paint and Resize
e. Initialize, Resize, Paint and Load
41. Which parameter of the Write Property method can be omitted but should be included to increase the efficiency of the control?
a. Name
b. Value
c. PropBag
d. DefaultValue
e. Title
f. Tag
42. Message Boxes can hold a maximum of _______ characters.
a. 256
b. 512
c. 1024
d. 4092
f. 10000
e. No limit
43. Which parameter of the Execute method of the Connection object returns the number of records that the operation affected?
a. RecordsAffected
b. RowsAffected
c. RecordsUpdated
d. RowsOperated
e. RecordsOperated
44. Which of the following is not an element of the ADO model?
a. Connection
b. Parameter
c. Recordset
d. Field
e. Driver
45. What data type is the HelpContextID?
a. String
b. Integer
c. Single
d. Double
e. Long
f. Char
46. Variables that allow sharing of values across event procedures are called:
a. Form level variable
b. Object variable
c. Module level variable
47. Which property of the ListView control determines which field a sort is based on?
a. Sorted
b. SortKey
c. SortOrder
d. SortField
e. Sort
f. ListKey
48. Consider the following subprogram:
Sub ChangeText(ByVal X as String,Y as String)
Y = X
End Sub
If you are calling it using the following code:
Call ChangeText(Form1.Caption,Y$)
a. The Caption of Form1 will change to the value contained in Y$
b. The Caption of Form1 will not change
c. The Caption changes at random intervals after the function call
d. The code is incorrect
49. Visual Basic fires the _______ event everytime a part of the form is newly exposed.
a. Load
b. Activate
c. Paint
d. Show
e. Initialize
50. Which of the following ADO recordset types provides the greatest degree of concurrency?
a. Static
b. Forward-only
c. Dynamic
d. Keyset
e. Read only
f. Keyset and Dynamic
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment