Educate yourself online!

Attention!

For new updates please visit http://www.shortquiz.blogspot.com


Visual Basic 6 Test

By on 00:11

Visual Basic 6 Test



Which event is triggered when the user moves to another open form?

a. Unload
b. QueryUnload
c. Deactivate
d. Terminate
e. Load
f. Initialize
g. Repaint
h. Resize

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

The __________ function returns the numeric value from a string expression:

a. Val
b. CStr
c. Round
d. Int
e. Num

Which events enable you to determine which key was pressed by the user?

a. Click and KeyPress
b. Click, KeyUp and KeyDown
c. KeyUp and KeyDown
d. KeyPress, KeyUp and KeyDown
e. Click, KeyPress, KeyUp and KeyDown

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.Number = 20000
c. Err.Raise 20000
d. Err.Raise vbObjectError,20000
e. Err.Number 20000
f. Error.Raise vbObjectError + 20000
g. Error.Number 20000
h. Error.Raise 20000

Which of the following debug tools would you use to locate your current position in a series of embedded procedure calls?

a. Locals window
b. Immediate window
c. Watch window
d. Callstack
e. Debug object

Which of the following approaches to data modifications is the least efficient?

a. Updating through a cursor using a recordset
b. A stored procedure
c. An update statement prepared and executed
d. An update statement executed directly
e. Updating through a data control

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.

Which of the following compiled elements does not run in process?

a. ActiveX EXE
b. ActiveX DLL
c. ActiveX Control
d. MTS Component
e. Standard DLL
f. Standard Exe

Which event should be used to resize an ActiveX control as the user modifies the size of the control implementation on a form?

a. Resize
b. Paint
c. Repaint
d. Initialize
e. Change
f. ReDimension
g. Dimension
h. Any of the above

Which of the following statements forces inline error handling?

a. On Error GoTo linelabel
b. On Error GoTo Inline
c. On Error Stop
d. On Error Resume Next
e. On Error GoTo 0
f. On Error Resume
g. None of the above

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
f. Error handling
g. None of the above

To save a file in a RichTextBox Control and a picture in a Picture Box Control, you will use the __________ and __________ statements, respectively:

a. RichText1.SaveFile, Picture1.SavePicture
b. RichText1.LoadFile, Picture1.LoadPicture
c. RichText1.SavePicture, Picture1.SaveFile
d. RichText1.LoadPicture, Picture1.SaveFile

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

The settings for the Color properties in Visual Basic are indicated by:

a. Decimal Coding
b. Octal Coding
c. Hexadecimal Coding
d. Binary Coding

Which property of the ProgressBar determines how much of the bar is filled?

a. Min
b. Max
c. Value
d. CurrentVal
e. FillValue
f. Fill
g. BarComplete

Which method will you use to remove a form from the Screen but retain it in memory?

a. Show method
b. Unload method
c. Hide method
d. CLS method
e. Deactivate method

Procedures declared in a __________ are local whereas procedures declared in a __________ are  available to the whole application.

a. Form window, standard or code module
b. Project window, view code window
c. Class module, code module

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

Which method would you use to get a free or unused File identifier while opening any file:

a. FreeFile
b. GetFileNum
c. GetFile
d. GetBytes
e. NextFile
f. File
g. GetNextFile
h. None of the above

You are creating a client application that calls ActiveX DLLs. Which of the following properties of the Err object provides the name of a component that sends an error back to the client application?

a. Number
b. Description
c. CompName
d. Component
e. Source
f. Text
g. Desc
h. None of the above

To destroy an object and free the memory space occupied by it, the keyword used is:

a. Delete
b. Kill
c. Nothing
d. New
e. Calloc
f. Abandon
g. Conserve
h. Free

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, Sort
f. Add, Remove, Count
g. Add, Delete, Count
h. Add, Set, Count

If the CancelError Property of the CommonDialog Box is set to true then which of the following statement is true:

a. A runtime error can result if the user clicks the cancel button
b. A compile time error occurs
c. The program executes without any error
d. You need to carry out conditional compilation
e. None of the above

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. Key
g. ListKey
h. None of the above

The __________ method resets the contents of bound controls to their original values when the user clicks on the cancel button.

a. UpdateControls
b. PaintPicture
c. Refresh
d. Resize
e. Resync
f. Restore
g. Cancel
h. Update

Only Controls with a __________ property such as Picturebox, Toolbox, Statusbar etc. can be placed on an MDI form:

a. Showtips
b. Negotiate
c. Align
d. BorderStyle = 0
e. Visible
f. Locked
g. Enabled
h. Tag

Which of the following statements should you write to cause the component to fire an event?

a. RaiseEvent
b. DeclareEvent
c. FireEvent
d. DoEvents
e. ExecuteEvents
f. Execute
g. TriggerEvent

What is the default value for the scalemode property of the form?

a. Twip
b. Point
c. Pixel
d. Character
e. Centimeter
f. Inches
g. Millimeters

Which line of the following code contains an error?

1 public Sub Command1_Click()
2 Dim str As String
str = "Hello World"
3 i = val(str)
4 length = len(str)
5 Msgbox "No Of Characters in " & str & " = " & CStr(length)
6 End Sub

a. Error on line 1
b. Error on line 2
c. Error on line 3
d. Error on line 4
e. Error on line 5
f. Error on line 6
g. No Error

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

Which of the following is the only valid Resume statement in an error handler?

a. Resume prior
b. Resume previous
c. Resume later
d. Resume next
e. Resume before
f. Resume to
g. Resume statement
h. Resume application

Global Procedures and Global Variables are declared in:

a. Form Modules
b. Standard (Code) Modules
c. Class Modules
d. Resource files
e. ActiveX Controls
f. Data Environment

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

A __________ control defaults to displaying the files in the current directory:

a. File List Box
b. Dir List Box
c. Drive List Box
d. Combo Box
e. Picture Box
f. List Box
g. Combo Box
h. DataGrid

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
e. Append mode
f. Read Mode

An ADO dynamic property is:

a. A property that changes value at runtime
b. A value defined by the user
c. A value defined by the operating system
d. A property that dynamically resizes as needed to accommodate database parameters
e. A property implemented by the OLE DB service provider

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

A project group is a Project which:

a. Consists of several Programs
b. Consists of several Applications
c. Consists of Various Forms And Code Modules
d. Consists of several Projects

The __________ property is used to show Tool Tips or Help Balloons when the mouse rests on the object:

a. ToolTipText
b. Tag
c. Dragmode
d. ShowTips
e. Help
f. Tip
g. ShowHelp
h. Tab

0 comments:

Post a Comment