Upwork Test Answers: Get all the correct answers of most recent and possible Upwork Tests A to Z (Updated on Jan, 2016)
Cover Letter Templates: These cover letter samples are not only for Upwork job, but also you will have some idea about your real life job
Freelance Profile Overviews: Different Profile samples and overviews of experts, advanced and intermediate level freelancers
For Newbie of Upwork: Upwork Help - How to apply for a job in Upwork with 10 most important articles about Upwork

A to Z View - All Upwork Test Answers

Visual Basic 6 Test Answers

Upwork General Programming Category - Visual Basic 6 Test Answers

Most recent questions with answers of the Upwork Visual Basic 6 Test, press Ctrl + F to find your desired answers of this test.

1. An ADO dynamic property is:
 Answers: • A property that changes value at runtime

 2. In order to provide a transparent background to the Form, you must change the _________ property to _______.
 Answers: • BackStyle, Opaque

 3. Which of the following cannot be included in the Open method of the recordset?
 Answers: • Cursor Type

 4. What does the controls collection contain?
 Answers: • A list of all controls on a form

 5. 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?
 Answers: • Number

 6. Global Procedures and Global Variables are declared in:
 Answers: • Form Modules

 7. 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
 Answers: • None

 8. Only Controls with a ________ property such as Picturebox, Toolbox, Statusbar etc. can be placed on an MDI form:
 Answers: • Showtips

 9. Whenever the current record is about to change, Visual Basic generates the ______ event:
 Answers: • Validate

 10. Which of the following will provide the best aggregate performance for a query that is not executed repeatedly?
 Answers: • Direct execution

 11. The _______ property enables Visual Basic to draw complete images in memory before displaying them on the Screen.
 Answers: • AutoRedraw = True

 12. Which event of an ActiveX control data provider runs every time a bound control extracts data through the provider?
 Answers: • GetDataMember

 13. Which event should you use to store property values into the PropertyBag?
 Answers: • Terminate

 14. One can convert a Visual Basic Application into ActiveX Document using:
 Answers: • Visual Database Manager

 15. Which event should be used to resize an ActiveX control as the user modifies the size of the control implementation on a form?
 Answers: • Resize

 16. The ______ function can be used to run any .com, .exe, .bat or .pif file from a Visual Basic program.
 Answers: • Shell

 17. 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
 Answers: • Both (i) and (ii) are correct

 18. Which function or method will you use to get a count of the maximum index limit of an array?
 Answers: • UBound function

 19. Which property of the ProgressBar determines how much of the bar is filled?
 Answers: • Min

 20. In order to change the mouse pointer shape from glass to watch-glass, the property to be used is:
 Answers: • MousePointer

 21. The caption and the name properties of the command button:
 Answers: • Are one and the same

 22. In order to access a file in Non-textual format, you have to open file in:
 Answers: • Ascii Format

 23. What is the extension of the Visual Basic project file that stores the design of a user control.
 Answers: • .ctx

 24. After a Dynaset type recordset has been created and opened, further searching is possible using the:
 Answers: • FindNext method

 25. Which method of the Recordset object should you use to navigate multiple recordsets returned by a stored procedure?
 Answers: • NewRecordset

 26. Which event procedure is called only if AutoRedraw property is set to false:
 Answers: • Form_GotFocus

 27. Which events enable you to determine which key was pressed by the user?
 Answers: • Click and KeyPress

 28. The Kill command in Visual Basic is used for:
 Answers: • Stopping the current process

 29. Which method would you use to get a free or unused File identifier while opening any file:
 Answers: • FreeFile

 30. What data type is the HelpContextID?
 Answers: • String

 31. Which event is fired when a text box loses focus?
 Answers: • LostFocus

 32. Message Boxes can hold a maximum of _______ characters.
 Answers: • 256

 33. Which of the following is the only valid Resume statement in an error handler?
 Answers: • Resume prior

 34. To store pictures in an array, Visual Basic provides the _____ control.
 Answers: • PictureClip

 35. Which is the only event of the timer control?
 Answers: • Timer

 36. 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$)
 Answers: • The Caption of Form1 will change to the value contained in Y$

 37. 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.
 Answers: • Caption

 38. What is the sequence of events when a form is unloaded?
 Answers: • QueryUnload, Unload and Terminate

 39. What is the default value for the scalemode property of the form?
 Answers: • Twip

 40. Which property of the Err object returns the numeric value associated with the most recent runtime error?
 Answers: • Description

 41. The event Lost_Focus of one object results in _____ of the other object:
 Answers: • Got_Focus

 42. Which of the following ADO recordset types provides the greatest degree of concurrency?
 Answers: • Static

 43. The ______ property is used to show Tool Tips or Help Balloons when the mouse rests on the object:
 Answers: • ToolTipText

 44. Which of the following can be shown to the user using the Common Dialog control in VB?
 Answers: • Common messages passed to Windows

 45. Which property of the form changes the form's title?
 Answers: • Name

 46. 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:
 Answers: • DataSource

 47. In Visual Basic, which method can you use to send key strokes to other Window applications?
 Answers: • AppActivate

 48. The _______ property changes the tab order at runtime:
 Answers: • Tab stop

 49. Which of the following tools can be used to change the value of a variable or property during break mode of an application?
 Answers: • Debug object

 50. 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?
 Answers: • Cancel

 51. Which collection of an ActiveX control enumerates all of the properties that can be bound to a data source?
 Answers: • DataFields

 52. Which of the following situations would not cause the Initialize event of an ActiveX control to occur?
 Answers: • When a form designer containing a control is closed

 53. You can create menus by the ________ and _________.
 Answers: • Menu Editor, Application Wizard

 54. What is the sequence in which the following events are triggered when a form is loaded?
 Answers: • Initialize, Load, Resize and Paint

 55. Visual Basic displays information depending upon the current value of two properties of the form, called:
 Answers: • CurrentX and CurrentY

 56. Which of the following statements is capable of abandoning a series of modifications made to a recordset locked with a BatchOptimistic lock?
 Answers: • CancelUpdate

 57. Which of the following is the valid stepping option?
 Answers: • Step Into

 58. Procedures declared in a _____ are local whereas procedures declared in a ______ are available to the whole application.
 Answers: • Form window, standard or code module

 59. Which property of the ListView control determines which field a sort is based on?
 Answers: • Sorted

 60. The method used to search for records from within a table type recordset object is:
 Answers: • LookUp

 61. Which of the following methods is used to inform an ActiveX control's container that one of its properties has been modified?
 Answers: • ModifyProperty

 62. Which event is triggered when the user moves to another open form?
 Answers: • Unload

 63. Which of the following is an event of the Shape control?
 Answers: • GotFocus

 64. What is the purpose of the Image List Control?
 Answers: • To display images to the user

 65. Which line of code listed here can be used to create a string of fixed length:
 Answers: • Dim strFirstName as String

 66. Which of the following statements is incorrect regarding toolbars?
 Answers: • There can be only one toolbar on a form

 67. Which of the following statements should you write to cause the component to fire an event?
 Answers: • TriggerEvent

 68. A __________ control defaults to displaying the files in the current directory:
 Answers: • File List Box

 69. The settings for the Color properties in Visual Basic are indicated by:
 Answers: • Decimal Coding

 70. What does the forms collection contain?
 Answers: • A list of all forms in a project

 71. Which of the following will perform a direct execution of a Command object?
 Answers: • The Execute method

 72. The _______ function enables a VB application to make use of the idle time and to respond periodically to events.
 Answers: • GetTime()

 73. Which property procedure is used to retrieve the value of a property?
 Answers: • Retrieve

 74. Which method will you use to remove a form from the Screen but retain it in memory?
 Answers: • Show method

 75. The Load & Activate events are associated with:
 Answers: • All controls

 76. Which events allow you to determine if a Control or Shift key was pressed by the user?
 Answers: • Click and KeyPress

 77. What you must do before making calls to an ActiveX DLL project in the same Project Group?
 Answers: • Compile the DLL

 78. 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:
 Answers: • Background color property

 79. The ____ function returns the numeric value from a string expression:
 Answers: • Val

 80. Name the only property supported by a collection?
 Answers: • Name

 81. What do CurrentX and CurrentY return?
 Answers: • Current X and Y co-ordinates of mousepointer

 82. Variables that allow sharing of values across event procedures are called:
 Answers: • Form level variable

 83. Which event of a text box would you use for validating the data entered by the user?
 Answers: • Validate

 84. Which of the following approaches to data modifications is the least efficient?
 Answers: • Updating through a cursor using a recordset

 85. The interval property of the Timer control specifies the time in:
 Answers: • Milliseconds

 86. Which event occurs only once in the entire life cycle of an ActiveX control?
 Answers: • Initialize

 87. How can you keep the user from exiting a form by clicking the Close button?
 Answers: • Place code in the Terminate event

 88. Which of the following are not properties of Command Button:
 Answers: • Bold

 89. Which of the following debug tools would you use to locate your current position in a series of embedded procedure calls?
 Answers: • Locals window

 90. 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?
 Answers: • Err.Raise vbObjectError + 20000

 91. A prepared statement is:
 Answers: • Query text cached on the server

 92. Which parameter of the WriteProperty method can be omitted but should be included to increase the efficiency of the control?
 Answers: • Name

 93. A project group is a Project which:
 Answers: • Consists of several Projects

 94. The _______ method loads the form named 'Form1' in to memory and also displays it.
 Answers: • Load Form1

 95. You want to display the code and the description of an error. What would be the correct syntax?
 Answers: • Msgbox err.no & err.text

 96. If the CancelError Property of the CommonDialog Box is set to true then which of the following statement is true:
 Answers: • A runtime error can result if the user clicks the cancel button

 97. How do you create a read only property in a form?
 Answers: • Create only a Property Set procedure

 98. What is the purpose of the Class Builder add-in in Visual Basic:
 Answers: • To add classes to the current project

 99. Which three methods does the collection object support?
 Answers: • Let, Get, Set

 100. Labels do not respond to _____ and ______ events.
 Answers: • Got_Focus , Lost_Focus

 101. The _______ method resets the contents of bound controls to their original values when the user clicks on the cancel button.
 Answers: • UpdateControls

 102. Which of the following is the only drag related event?
 Answers: • DragEnter

 103. 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?
 Answers: • 1-1000

 104. Which of the following procedure types will execute when you assign a value to a property of an object?
 Answers: • Property Get

 105. Which parameter of the Execute method of the Connection object returns the number of records that the operation affected?
 Answers: • RecordsAffected

 106. Which of the following statements forces inline error handling?
 Answers: • On Error GoTo 0

 107. Which of the following compiled elements does not run in process?
 Answers: • MTS Component

 108. Which of the following locking types will lock a recordset only during an Update process and not immediately when the data modifications are requested?
 Answers: • Read only

 109. Which form event would you use to activate a pop-up menu when the user clicks the right mouse button?
 Answers: • Click