UpWork (oDesk) & Elance Visual Basic 6 Test Question & Answers are really very important to pass UpWork & Elance test. You will get top score at this skill test exam. If you found any problem or wrong answer please inform me via contact or comments. We will try to solve it in short. This test is extremely valuable to acquire knowledge of Visual Basic 6. Lets Start test.
Ques : Which of the following cannot be included in the Open method of the recordset?
Ans : Cursor Type
Ques : 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?
Ans : Number
Ques : Which event should you use to store property values into the PropertyBag?
Ans : Terminate
Ques : Which event should be used to resize an ActiveX control as the user modifies the size of the control implementation on a form?
Ans : Resize
Ques : The ______ function can be used to run any .com, .exe, .bat or .pif file from a Visual Basic program.
Ans : Shell
Ques : 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
Ans : Both (i) and (ii) are correct
Ques : What data type is the HelpContextID?
Ans : String
Ques : To store pictures in an array, Visual Basic provides the _____ control.
Ans : PictureClip
Ques : What is the sequence of events when a form is unloaded?
Ans : QueryUnload, Unload and Terminate
Ques : What is the default value for the scalemode property of the form?
Ans : Twip
Ques : Visual Basic displays information depending upon the current value of two properties of the form, called:
Ans : CurrentX and CurrentY
Ques : Which of the following statements is capable of abandoning a series of modifications made to a recordset locked with a BatchOptimistic lock?
Ans : CancelUpdate
Ques : What is the purpose of the Image List Control?
Ans : To display images to the user
Ques : A __________ control defaults to displaying the files in the current directory:
Ans : File List Box
Ques : Which property procedure is used to retrieve the value of a property?
Ans : Retrieve
Ques : Which method will you use to remove a form from the Screen but retain it in memory?
Ans : Show method
Ques : Which events allow you to determine if a Control or Shift key was pressed by the user?
Ans : Click and KeyPress
Ques : 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:
Ans : Background color property
Ques : The ____ function returns the numeric value from a string expression:
Ans : Val
Ques : What do CurrentX and CurrentY return?
Ans : Current X and Y co-ordinates of mousepointer
Ques : Variables that allow sharing of values across event procedures are called:
Ans : Form level variable
Ques : Which of the following approaches to data modifications is the least efficient?
Ans : Updating through a cursor using a recordse
Ques : The interval property of the Timer control specifies the time in:
Ans : Milliseconds
Ques : Which parameter of the WriteProperty method can be omitted but should be included to increase the efficiency of the control?
Ans : Name
Ques : A project group is a Project which:
Ans : Consists of several Projects
Ques : What is the purpose of the Class Builder add-in in Visual Basic:
Ans : To add classes to the current project
Ques : An ADO dynamic property is:
Ans : A property that changes value at runtime
Ques : In order to provide a transparent background to the Form, you must change the _________ property to _______.
Ans : BackStyle, Opaque
Ques : What does the controls collection contain?
Ans : A list of all controls on a form
Ques : Global Procedures and Global Variables are declared in:
Ans : Form Modules
Ques : Given the following code segment, how many instances of the form are created and displayed ?
dim frmvar1 as frmperson,frmvar2 as frmperson
set frmvar1 = new frmperson
set frmvar2 = frmvar1
load frmvar1
frmvar2.show
Ans : None
Ques : Only Controls with a ________ property such as Picturebox, Toolbox, Statusbar etc. can be placed on an MDI form:
Ans : Showtips
Ques : Whenever the current record is about to change, Visual Basic generates the ______ event:
Ans : Validate
Ques : Which of the following will provide the best aggregate performance for a query that is not executed repeatedly?
Ans : Direct execution
Ques : The _______ property enables Visual Basic to draw complete images in memory before displaying them on the Screen.
Ans : AutoRedraw = True
Ques : Which event of an ActiveX control data provider runs every time a bound control extracts data through the provider?
Ans : GetDataMember
Ques : One can convert a Visual Basic Application into ActiveX Document using:
Ans : Visual Database Manager
Ques : Which function or method will you use to get a count of the maximum index limit of an array?
Ans : UBound function
Ques : Which property of the ProgressBar determines how much of the bar is filled?
Ans : Min
Ques : In order to change the mouse pointer shape from glass to watch-glass, the property to be used is:
Ans : MousePointer
Ques : The caption and the name properties of the command button:
Ans : Are one and the same
Ques : In order to access a file in Non-textual format, you have to open file in:
Ans : Ascii Format
Ques : What is the extension of the Visual Basic project file that stores the design of a user control.
Ans : .ctx
Ques : After a Dynaset type recordset has been created and opened, further searching is possible using the:
Ans : FindNext method
Ques : Which method of the Recordset object should you use to navigate multiple recordsets returned by a stored procedure?
Ans : NewRecordset
Ques : Which event procedure is called only if AutoRedraw property is set to false:
Ans : Form_GotFocus
Ques : Which events enable you to determine which key was pressed by the user?
Ans : Click and KeyPress
Ques : The Kill command in Visual Basic is used for:
Ans : Stopping the current process
Ques : Which method would you use to get a free or unused File identifier while opening any file:
Ans : FreeFile
Ques : Which event is fired when a text box loses focus?
Ans : LostFocus
Ques : Message Boxes can hold a maximum of _______ characters.
Ans : 256
Ques : Which of the following is the only valid Resume statement in an error handler?
Ans : Resume prior
Ques : Which is the only event of the timer control?
Ans : Timer
Ques : 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$)
Ans : The Caption of Form1 will change to the value contained in Y$
Ques : 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.
Ans : Caption
Ques : Which property of the Err object returns the numeric value associated with the most recent runtime error?
Ans : Description
Ques : The event Lost_Focus of one object results in _____ of the other object:
Ans : Got_Focus
Ques : Which of the following ADO recordset types provides the greatest degree of concurrency?
Ans : Static
Ques : The ______ property is used to show Tool Tips or Help Balloons when the mouse rests on the object:
Ans : ToolTipText
Ques : Which of the following can be shown to the user using the Common Dialog control in VB?
Ans : Common messages passed to Windows
Ques : Which property of the form changes the form's title?
Ans : Name
Ques : 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:
Ans : DataSource
Ques : In Visual Basic, which method can you use to send key strokes to other Window applications?
Ans : AppActivate
Ques : The _______ property changes the tab order at runtime:
Ans : Tab stop
Ques : 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?
Ans : Cancel
Ques : Which collection of an ActiveX control enumerates all of the properties that can be bound to a data source?
Ans : DataFields
Ques : You can create menus by the ________ and _________.
Ans : Menu Editor, Application Wizard
Ques : What is the sequence in which the following events are triggered when a form is loaded?
Ans : Initialize, Load, Resize and Paint
Ques : Procedures declared in a _____ are local whereas procedures declared in a ______ are available to the whole application.
Ans : Form window, standard or code module
Ques : Which property of the ListView control determines which field a sort is based on?
Ans : Sorted
Ques : The method used to search for records from within a table type recordset object is:
Ans : LookUp
Ques : Which event is triggered when the user moves to another open form?
Ans : Unload
Ques : Which of the following is an event of the Shape control?
Ans : GotFocus
Ques : Which line of code listed here can be used to create a string of fixed length:
Ans : Dim strFirstName as String
Ques : Which of the following statements is incorrect regarding toolbars?
Ans : There can be only one toolbar on a form
Ques : The settings for the Color properties in Visual Basic are indicated by:
Ans : Decimal Coding
Ques : What does the forms collection contain?
Ans : A list of all forms in a project
Ques : Which of the following will perform a direct execution of a Command object?
Ans : The Execute method
Ques : The _______ function enables a VB application to make use of the idle time and to respond periodically to events.
Ans : GetTime()
Ques : The Load & Activate events are associated with:
Ans : All controls
Ques : What you must do before making calls to an ActiveX DLL project in the same Project Group?
Ans : Compile the DLL
Ques : Name the only property supported by a collection?
Ans : Name
Ques : Which event of a text box would you use for validating the data entered by the user?
Ans : Validate
Ques : Which event occurs only once in the entire life cycle of an ActiveX control?
Ans : Initialize
Ques : How can you keep the user from exiting a form by clicking the Close button?
Ans : Place code in the Terminate event
Ques : Which of the following debug tools would you use to locate your current position in a series of embedded procedure calls?
Ans : Locals window
Ques : 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?
Ans : Err.Raise vbObjectError + 20000
Ques : A prepared statement is:
Ans : Query text cached on the server
Ques : The _______ method loads the form named 'Form1' in to memory and also displays it.
Ans : Load Form1
Ques : You want to display the code and the description of an error. What would be the correct syntax?
Ans : Msgbox err.no & err.text
Ques : If the CancelError Property of the CommonDialog Box is set to true then which of the following statement is true:
Ans : A runtime error can result if the user clicks the cancel button
Ques : How do you create a read only property in a form?
Ans : Create only a Property Set procedure
Ques : Which three methods does the collection object support?
Ans : Let, Get, Set
Ques : Labels do not respond to _____ and ______ events.
Ans : Got_Focus , Lost_Focus
Ques : The _______ method resets the contents of bound controls to their original values when the user clicks on the cancel button.
Ans : UpdateControls
Ques : Which of the following is the only drag related event?
Ans : DragEnter
Ques : 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?
Ans : 1-1000
Ques : Which of the following procedure types will execute when you assign a value to a property of an object?
Ans : Property Get
Thanks for watching this test Question & Answers. Please don't forget to leave a comment about this post. You can also find some more effective test question & answers, information, techniques, technology news, tutorials, online earning information, recent news, results, job news, job exam results, admission details & another related services on the following sites below. Happy Working!
News For Todays ARSBD UpWorkElanceTests ARSBD-JOBS DesignerTab UpLance
We recommend you to subscribe us to get update from your email. EmoticonEmoticon