Labels do not respond to _____ and ______ events.
Correct Answer:
Got_Focus , Lost_Focus
Note: This Question is unanswered, help us to find answer for this one
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
Correct Answer:
MyVar has not been declared
Note: This Question is unanswered, help us to find answer for this one
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
Correct Answer:
Error on line 3
Note: This Question is unanswered, help us to find answer for this one
In Visual Basic, which method can you use to send key strokes to other Window applications?
Correct Answer:
SendKeys
Note: This Question is unanswered, help us to find answer for this one
Which property of the ListView control determines which field a sort is based on?
Correct Answer:
Sorted
Note: This Question is unanswered, help us to find answer for this one
How do you make a control gray and inaccessible in VB?
Correct Answer:
Set enabled to false
Note: This Question is unanswered, help us to find answer for this one
Which of the following is the valid stepping option?
Correct Answer:
Step Over
Note: This Question is unanswered, help us to find answer for this one
Which of the following is not an element of the ADO model?
Correct Answer:
Error
Note: This Question is unanswered, help us to find answer for this one
The vbCritical symbol displays:
Correct Answer:
A critical message icon
Note: This Question is unanswered, help us to find answer for this one
To destroy an object and free the memory space occupied by it, the keyword used is:
Correct Answer:
Kill
Note: This Question is unanswered, help us to find answer for this one
To save a file in a RichTextBox Control and a picture in a Picture Box Control, you will use the _________ and __________ statements, respectively:
Correct Answer:
RichText1.SaveFile, Picture1.SavePicture
Note: This Question is unanswered, help us to find answer for this one
Which of the following compiled elements does not run in process?
Correct Answer:
ActiveX EXE
Note: This Question is unanswered, help us to find answer for this one
The _____ of the Visual Basic IDE displays a list of all the files of an application:
Correct Answer:
Project window
Note: This Question is unanswered, help us to find answer for this one
Which object is used for error handling?
Correct Answer:
Err
Note: This Question is unanswered, help us to find answer for this one
To deactivate the Form UnLoad event, you make the following change in the function definiton:
Private Sub Query_Unload(Cancel as Integer,UnloadMode as Integer)
To prevent the Form from closing, you will set the:
Correct Answer:
Cancel parameter to 1
Note: This Question is unanswered, help us to find answer for this one
How many root nodes can a TreeView control have?
Correct Answer:
1
Note: This Question is unanswered, help us to find answer for this one
Which form event would you use to activate a pop-up menu when the user clicks the right mouse button?
Correct Answer:
MouseUp
Note: This Question is unanswered, help us to find answer for this one
Which of the following locking types will lock a recordset only during an Update process and not immediately when the data modifications are requested?
Correct Answer:
Optimistic
Note: This Question is unanswered, help us to find answer for this one
Which of the following statements forces inline error handling?
Correct Answer:
On Error Resume Next
Note: This Question is unanswered, help us to find answer for this one
Which parameter of the Execute method of the Connection object returns the number of records that the operation affected?
Correct Answer:
RecordsAffected
Note: This Question is unanswered, help us to find answer for this one
Which of the following procedure types will execute when you assign a value to a property of an object?
Correct Answer:
Property Let
Note: This Question is unanswered, help us to find answer for this one
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?
Correct Answer:
513-65535
Note: This Question is unanswered, help us to find answer for this one
Which of the following is the only drag related event?
Correct Answer:
DragDrop
Note: This Question is unanswered, help us to find answer for this one
The _______ method resets the contents of bound controls to their original values when the user clicks on the cancel button.
Correct Answer:
UpdateControls
Note: This Question is unanswered, help us to find answer for this one
Which three methods does the collection object support?
Correct Answer:
Add, Remove, Count
Note: This Question is unanswered, help us to find answer for this one
What is the purpose of the Class Builder add-in in Visual Basic:
Correct Answer:
To create new classes and define their properties, methods & events
Note: This Question is unanswered, help us to find answer for this one
How do you create a read only property in a form?
Correct Answer:
Create only a Property Get procedure
Note: This Question is unanswered, help us to find answer for this one
If the CancelError Property of the CommonDialog Box is set to true then which of the following statement is true:
Correct Answer:
A runtime error can result if the user clicks the cancel button
Note: This Question is unanswered, help us to find answer for this one
You want to display the code and the description of an error. What would be the correct syntax?
Correct Answer:
Msgbox err.number & err.description
Note: This Question is unanswered, help us to find answer for this one
The _______ method loads the form named 'Form1' in to memory and also displays it.
Correct Answer:
Form1.Show
Note: This Question is unanswered, help us to find answer for this one
A project group is a Project which:
Correct Answer:
Consists of several Projects
Note: This Question is unanswered, help us to find answer for this one
Which parameter of the WriteProperty method can be omitted but should be included to increase the efficiency of the control?
Correct Answer:
PropBag
Note: This Question is unanswered, help us to find answer for this one
A prepared statement is:
Correct Answer:
Compiled query cached on the server
Note: This Question is unanswered, help us to find answer for this one
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?
Correct Answer:
Err.Raise vbObjectError + 20000
Note: This Question is unanswered, help us to find answer for this one
Which of the following debug tools would you use to locate your current position in a series of embedded procedure calls?
Correct Answer:
Callstack
Note: This Question is unanswered, help us to find answer for this one
Which of the following are not properties of Command Button:
Correct Answer:
Multi-Line
Note: This Question is unanswered, help us to find answer for this one
How can you keep the user from exiting a form by clicking the Close button?
Correct Answer:
Place code in the QueryUnload event
Note: This Question is unanswered, help us to find answer for this one
Which event occurs only once in the entire life cycle of an ActiveX control?
Correct Answer:
Initialize
Note: This Question is unanswered, help us to find answer for this one
The interval property of the Timer control specifies the time in:
Correct Answer:
Milliseconds
Note: This Question is unanswered, help us to find answer for this one
Which of the following approaches to data modifications is the least efficient?
Correct Answer:
Updating through a cursor using a recordset
Note: This Question is unanswered, help us to find answer for this one
Which event of a text box would you use for validating the data entered by the user?
Correct Answer:
Validate
Note: This Question is unanswered, help us to find answer for this one
Variables that allow sharing of values across event procedures are called:
Correct Answer:
Module level variable
Note: This Question is unanswered, help us to find answer for this one
What do CurrentX and CurrentY return?
Correct Answer:
Current X and Y co-ordinates of mousepointer
Note: This Question is unanswered, help us to find answer for this one
Name the only property supported by a collection?
Correct Answer:
None of the above
Note: This Question is unanswered, help us to find answer for this one
The ____ function returns the numeric value from a string expression:
Correct Answer:
Val
Note: This Question is unanswered, help us to find answer for this one
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:
Correct Answer:
ZOrder property
Note: This Question is unanswered, help us to find answer for this one
What you must do before making calls to an ActiveX DLL project in the same Project Group?
Correct Answer:
Compile the DLL
Note: This Question is unanswered, help us to find answer for this one
Which events allow you to determine if a Control or Shift key was pressed by the user?
Correct Answer:
KeyUp and KeyDown
Note: This Question is unanswered, help us to find answer for this one
The Load & Activate events are associated with:
Correct Answer:
Form
Note: This Question is unanswered, help us to find answer for this one
Which method will you use to remove a form from the Screen but retain it in memory?
Correct Answer:
Hide method
Note: This Question is unanswered, help us to find answer for this one
Which property procedure is used to retrieve the value of a property?
Correct Answer:
GetProperty
Note: This Question is unanswered, help us to find answer for this one
The _______ function enables a VB application to make use of the idle time and to respond periodically to events
Correct Answer:
DoEvents
Note: This Question is unanswered, help us to find answer for this one
Which of the following will perform a direct execution of a Command object?
Correct Answer:
The Execute method
Note: This Question is unanswered, help us to find answer for this one
What does the forms collection contain?
Correct Answer:
A list of all forms in a project
Note: This Question is unanswered, help us to find answer for this one
The settings for the Color properties in Visual Basic are indicated by:
Correct Answer:
Hexadecimal Coding
Note: This Question is unanswered, help us to find answer for this one
A __________ control defaults to displaying the files in the current directory:
Correct Answer:
File List Box
Note: This Question is unanswered, help us to find answer for this one
Which of the following statements should you write to cause the component to fire an event?
Correct Answer:
RaiseEvent
Note: This Question is unanswered, help us to find answer for this one
Which of the following statements is incorrect regarding toolbars?
Correct Answer:
Toolbars can be positioned anywhere on the form
Note: This Question is unanswered, help us to find answer for this one
Which line of code listed here can be used to create a string of fixed length:
Correct Answer:
strFirstName * 255
Note: This Question is unanswered, help us to find answer for this one
What is the purpose of the Image List Control?
Correct Answer:
To provide a repository for images used by other controls
Note: This Question is unanswered, help us to find answer for this one
Which of the following is an event of the Shape control?
Correct Answer:
A shape control does not have events
Note: This Question is unanswered, help us to find answer for this one
Which event is triggered when the user moves to another open form?
Correct Answer:
Deactivate
Note: This Question is unanswered, help us to find answer for this one
Which of the following methods is used to inform an ActiveX control's container that one of its properties has been modified?
Correct Answer:
PropertyChanged
Note: This Question is unanswered, help us to find answer for this one
The method used to search for records from within a table type recordset object is:
Correct Answer:
Seek
Note: This Question is unanswered, help us to find answer for this one
Procedures declared in a _____ are local whereas procedures declared in a ______ are available to the whole application.
Correct Answer:
Class module, code module
Note: This Question is unanswered, help us to find answer for this one
Which of the following statements is capable of abandoning a series of modifications made to a recordset locked with a BatchOptimistic lock?
Correct Answer:
CancelBatch
Note: This Question is unanswered, help us to find answer for this one
Visual Basic displays information depending upon the current value of two properties of the form, called:
Correct Answer:
CurrentX and CurrentY
Note: This Question is unanswered, help us to find answer for this one
What is the sequence in which the following events are triggered when a form is loaded?
Correct Answer:
Initialize, Load, Resize and Paint
Note: This Question is unanswered, help us to find answer for this one
You can create menus by the ________ and _________.
Correct Answer:
Menu Editor, Win32 API
Note: This Question is unanswered, help us to find answer for this one
Which of the following situations would not cause the Initialize event of an ActiveX control to occur?
Correct Answer:
When a form designer containing a control is closed
Note: This Question is unanswered, help us to find answer for this one
Which collection of an ActiveX control enumerates all of the properties that can be bound to a data source?
Correct Answer:
DataMembers
Note: This Question is unanswered, help us to find answer for this one
You want the code of the close command button to execute upon pressing the ESC key, even though the focus may be on another control in the form. Which property of the command button would you set to true?
Correct Answer:
Cancel
Note: This Question is unanswered, help us to find answer for this one
Which of the following tools can be used to change the value of a variable or property during break mode of an application?
Correct Answer:
Immediate window
Note: This Question is unanswered, help us to find answer for this one
The _______ property changes the tab order at runtime:
Correct Answer:
Tab index
Note: This Question is unanswered, help us to find answer for this one
In order to enable the DBGridControl or the MSFlexGrid Control to display the contents of a table or query, you need to set only the ______ property:
Correct Answer:
DataSource
Note: This Question is unanswered, help us to find answer for this one
Which property of the form changes the form's title?
Correct Answer:
Caption
Note: This Question is unanswered, help us to find answer for this one
Which of the following can be shown to the user using the Common Dialog control in VB?
Correct Answer:
Open dialog box
Note: This Question is unanswered, help us to find answer for this one
The ______ property is used to show Tool Tips or Help Balloons when the mouse rests on the object:
Correct Answer:
ToolTipText
Note: This Question is unanswered, help us to find answer for this one
Which of the following ADO recordset types provides the greatest degree of concurrency?
Correct Answer:
Dynamic
Note: This Question is unanswered, help us to find answer for this one
The event Lost_Focus of one object results in _____ of the other object:
Correct Answer:
Got_Focus
Note: This Question is unanswered, help us to find answer for this one
Which property of the Err object returns the numeric value associated with the most recent runtime error?
Correct Answer:
Number
Note: This Question is unanswered, help us to find answer for this one
What is the default value for the scalemode property of the form?
Correct Answer:
Pixel
Note: This Question is unanswered, help us to find answer for this one
What is the sequence of events when a form is unloaded?
Correct Answer:
QueryUnload, Unload and Terminate
Note: This Question is unanswered, help us to find answer for this one
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$)
Correct Answer:
The Caption of Form1 will not change
Note: This Question is unanswered, help us to find answer for this one
Which is the only event of the timer control?
Correct Answer:
Timer
Note: This Question is unanswered, help us to find answer for this one
To store pictures in an array, Visual Basic provides the _____ control.
Correct Answer:
ImageList
Note: This Question is unanswered, help us to find answer for this one
Which of the following is the only valid Resume statement in an error handler?
Correct Answer:
Resume next
Note: This Question is unanswered, help us to find answer for this one
Message Boxes can hold a maximum of _______ characters.
Correct Answer:
1024
Note: This Question is unanswered, help us to find answer for this one
Which event is fired when a text box loses focus?
Correct Answer:
LostFocus
Note: This Question is unanswered, help us to find answer for this one
What data type is the HelpContextID?
Correct Answer:
Integer
Note: This Question is unanswered, help us to find answer for this one
Which method would you use to get a free or unused File identifier while opening any file:
Correct Answer:
FreeFile
Note: This Question is unanswered, help us to find answer for this one
The Kill command in Visual Basic is used for:
Correct Answer:
Stopping the current process
Note: This Question is unanswered, help us to find answer for this one
Which events enable you to determine which key was pressed by the user?
Correct Answer:
KeyPress, KeyUp and KeyDown
Note: This Question is unanswered, help us to find answer for this one
Which event procedure is called only if AutoRedraw property is set to false:
Correct Answer:
Form_GotFocus
Note: This Question is unanswered, help us to find answer for this one
In order to provide a transparent background to the Form, you must change the _________ property to _______.
Correct Answer:
BackColor, Transparent
Note: This Question is unanswered, help us to find answer for this one
Which method of the Recordset object should you use to navigate multiple recordsets returned by a stored procedure?
Correct Answer:
NextRecordset
Note: This Question is unanswered, help us to find answer for this one
After a Dynaset type recordset has been created and opened, further searching is possible using the:
Correct Answer:
Seek method
Note: This Question is unanswered, help us to find answer for this one
What is the extension of the Visual Basic project file that stores the design of a user control.
Correct Answer:
.ocx
Note: This Question is unanswered, help us to find answer for this one
The caption and the name properties of the command button:
Correct Answer:
Can be different at times
Note: This Question is unanswered, help us to find answer for this one
Which property of the ProgressBar determines how much of the bar is filled?
Correct Answer:
Value
Note: This Question is unanswered, help us to find answer for this one
Which function or method will you use to get a count of the maximum index limit of an array?
Correct Answer:
UBound function
Note: This Question is unanswered, help us to find answer for this one
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
Correct Answer:
Only (ii) is correct
Note: This Question is unanswered, help us to find answer for this one
The ______ function can be used to run any .com, .exe, .bat or .pif file from a Visual Basic program.
Correct Answer:
Shell
Note: This Question is unanswered, help us to find answer for this one
Which event should be used to resize an ActiveX control as the user modifies the size of the control implementation on a form?
Correct Answer:
Resize
Note: This Question is unanswered, help us to find answer for this one
Which event should you use to store property values into the PropertyBag?
Correct Answer:
WriteProperties
Note: This Question is unanswered, help us to find answer for this one
Which event of an ActiveX control data provider runs every time a bound control extracts data through the provider?
Correct Answer:
GetDataMember
Note: This Question is unanswered, help us to find answer for this one
The _______ property enables Visual Basic to draw complete images in memory before displaying them on the Screen.
Correct Answer:
AutoRedraw = True
Note: This Question is unanswered, help us to find answer for this one
Which of the following will provide the best aggregate performance for a query that is not executed repeatedly?
Correct Answer:
Prepared statements
Note: This Question is unanswered, help us to find answer for this one
Whenever the current record is about to change, Visual Basic generates the ______ event:
Correct Answer:
Validate
Note: This Question is unanswered, help us to find answer for this one
Global Procedures and Global Variables are declared in:
Correct Answer:
Standard (Code) Modules
Note: This Question is unanswered, help us to find answer for this one
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?
Correct Answer:
Number
Note: This Question is unanswered, help us to find answer for this one
What does the controls collection contain?
Correct Answer:
A list of all controls on a form
Note: This Question is unanswered, help us to find answer for this one
An ADO dynamic property is:
Correct Answer:
A property that dynamically resizes as needed to accommodate database parameters
Note: This Question is unanswered, help us to find answer for this one
Visual Basic 6 MCQs | Topic-wise