Upwork VISUAL BASIC TEST 2016

Hello Freelancer, Welcome to allupworktestanswers.com Here to get the VISUAL BASIC TEST of Latest version 2016. We are ready here to provide your desire upwork test answer. We already tested all exam test information Available include on here. So Dear, Why Late? Read the below full exam test and get more information from our website.



1. Which of the following is the valid stepping option?
Answers:
  1. Step Around
  2. Step Beyond
  3. Step Over
  4. Step Behind
  5. Step forward
  6. Step Into
  7. Step Out
2. Which of the following procedure types will execute when you assign a value to a property of an object?
Answers:
  1. Property Get
  2. Property Assign
  3. Property Let
  4. Property Set
  5. Public Sub
3. Which line of code listed here can be used to create a string of fixed length:
Answers:
  1. Dim strFirstName as String
  2. strFirstName * 255
  3. strFirstName = 255
  4. Dim strFirstName as String(255)
  5. None of the above
4. Which event of an ActiveX control data provider runs every time a bound control extracts data through the provider?
Answers:
  1. GetDataMember
  2. GetDataField
  3. GetDataProperty
  4. GetDataRow
  5. GetData
  6. GetFields
  7. GetRows
  8. RetrieveData
5. Which property of the Err object returns the numeric value associated with the most recent runtime error?
Answers:
  1. Description
  2. No
  3. Number
  4. Source
  5. Errorcode
  6. Num
  7. Code
6. Which function or method will you use to get a count of the maximum index limit of an array?
Answers:
  1. UBound function
  2. LBound function
  3. Substr function
  4. Bound Control method
  5. Limit method
  6. UpperLimit method
  7. Upper method
  8. MaxArray function
7. Which is the only event of the timer control?
Answers:
Timer
  1. TimeElapsed
  2. TimeOver
  3. Reset
  4. TimeOut
  5. Restart
  6. Freeze
  7. Stop
8. What you must do before you make calls to an ActiveX DLL project in the same Project Group?
Answers:
  1. Compile the DLL
  2. Check the DLL off in your project’s Reference List
  3. Make sure the DLL is the Startup Project
  4. Ensure that a Standard Exe form is included and is made the Startup Form.
9. The _______ property changes the tab order at runtime:
Answers:
  1. Tab stop
  2. Tab key
  3. Tab order
  4. Tab index
10. Message Boxes can hold a maximum of _______ characters.
Answers:
  1. 256
  2. 512
  3. 1024
  4. 2046
  5. 4092
  6. 5000
  7. 10000
  8. No limit
11. Procedures declared in a _____ are local whereas procedures declared in a ______ are available to the whole application.
Answers:
  1. Form window, standard or code module
  2. Project window, view code window
  3. Class module, code module
12. To store pictures in an array, Visual Basic provides the _____ control.
Answers:
  1. PictureClip
  2. ImageList
  3. PictureBox
  4. Image Box
  5. Timer Control
  6. ListView
  7. Common Dialog
  8. DataGrid
13. Which of the following situations would not cause the Initialize event of an ActiveX control to occur?
Answers:
When a control is placed on a form at design time
  1. When a form designer containing a control is closed
  2. When a form is run
  3. When a compiled application containing a control executes
  4. When an application terminates and re-enters design-time for the host application
14. The settings for the Color properties in Visual Basic are indicated by:
Answers:
  1. Decimal Coding
  2. Octal Coding
  3. Hexadecimal Coding
  4. Binary Coding
15. You want to display the code and the description of an error. What would be the correct syntax?
Answers:
  1. Msgbox err.no & err.text
  2. Msgbox err.number & err.text
  3. Msgbox error.number & error.text
  4. Msgbox error.number & error.description
  5. Msgbox err.number & err.description
  6. Msgbox err.num & err.description
  7. Msgbox err.num & err.text
  8. None of the above
16. The Load & Activate events are associated with:
Answers:
  1. All controls
  2. Form
  3. Command button
  4. Image box
  5. TreeView control
  6. ListView control
  7. DataGrid
  8. ComboBox
17. How do you create a read only property in a form?
Answers:
  1. Create only a Property Set procedure
  2. Create only a Property Get procedure
  3. Create only a Property Let procedure
  4. Create both a Property Get and Property Let procedure
  5. Declare a public variable in the Declarations section of the form
  6. Declare a private variable in the Declarations section of the form
  7. Create both a Property Get and Property Set procedure
18. In Visual Basic, which method can you use to send key strokes to other Window applications?
Answers:
  1. AppActivate
  2. SendKeys
  3. Copying the contents from the ClipBoard & pasting
  4. Manually typing in the other application’s Window
  5. 19. Which of the following will provide the best aggregate performance for a query that is not executed repeatedly?
Answers:
  1. Direct execution
  2. Stored procedures
  3. Prepared statements
  4. Data Environment
  5. ADO Data Control
20. Which of the following is an event of the Shape control?
Answers:
  1. GotFocus
  2. LostFocus
  3. Validate
  4. KeyPress
  5. A shape control does not have events
21. Labels do not respond to _____ and ______ events.
Answers:
  1. Got_Focus , Lost_Focus
  2. Click , DblClick
  3. Dragdrop , OLECompleteDrag
  4. Change, Link Error
22. The ____ function returns the numeric value from a string expression:
Answers:
  1. Val
  2. CStr
  3. Round
  4. Int
  5. Num
23. Which of the following tools can be used to change the value of a variable or property during break mode of an application?
Answers:
  1. Watch window
  2. Immediate window
  3. Callstack
  4. Locals window
  5. Debug object
24. What data type is the HelpContextID?
Answers:
  1. String
  2. Integer
  3. Single
  4. Double
  5. Long
  6. Char
  7. Float
25. The Kill command in Visual Basic is used for:
Answers:
  1. Stopping the current process
  2. Deleting files
  3. Terminating the application
  4. Stopping the current thread
  5. Debugging the application
  6. Error handling
  7. None of the above
26. A prepared statement is:
Answers:
  1. Query text cached on the client
  2. Query text cached on the server
  3. Compiled query cached on the client
  4. Compiled query cached on the server
  5. A stored procedure
  6. None of the above
27. Which of the following statements should you write to cause the component to fire an event?
Answers:
  1. RaiseEvent
  2. DeclareEvent
  3. FireEvent
  4. DoEvents
  5. ExecuteEvents
  6. Execute
  7. TriggerEvent
28. 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:
  1. Pessimistic
  2. Update
  3. Optimistic
  4. Batch optimistic
  5. Read only
  6. Delayed locking
29. What is the extension of the Visual Basic project file that stores the design of a user control.
Answers:
  1. .ctx
  2. .ctl
  3. .ctr
  4. .ocx
  5. .vbp
  6. .dll
  7. .ucl
  8. .utl
30. 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:
  1. Number
  2. Description
  3. CompName
  4. Component
  5. Source
  6. Text
  7. Desc
  8. None of the above
31. 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:
  1. Both (i) and (ii) are correct
  2. Only (i) is correct
  3. Only (ii) is correct
  4. (i) contains a logical error
  5. (ii) contains an error
  6. Both (i) and (ii) contain errors
32. Variables that allow sharing of values across event procedures are called:
Answers:
  1. Form level variable
  2. Object variable
  3. Module level variable
33. Which property of the form changes the form’s title?
Answers:
  1. Name
  2. Heading
  3. Title
  4. Caption
  5. Logo
34. The event Lost_Focus of one object results in _____ of the other object:
Answers:
  1. Got_Focus
  2. Lost_Focus
  3. Mouse_click
  4. Refresh
  5. Validate
  6. Load
  7. Activate
  8. Initialize
35. How do you make a control gray and inaccessible in VB?
Answers:
  1. Set enabled to false
  2. Set disabled to true
  3. Color the control gray
  4. Hide the control
  5. Set the locked property to true
36. To destroy an object and free the memory space occupied by it, the keyword used is:
Answers:
  1. Delete
  2. Kill
  3. Nothing
  4. New
  5. Calloc
  6. Abandon
  7. Conserve
  8. Free
37. Which of the following methods is used to inform an ActiveX control’s container that one of its properties has been modified?
Answers:
  1. PropertyChanged
  2. CanPropertyChange
  3. ModifyProperty
  4. PropertyModify
  5. PropertyChange
  6. PropertyModified
  7. PropertyChanges
  8. ChangeProperty
  9. 38. Which of the following is the only valid Resume statement in an error handler?
Answers:
  1. Resume prior
  2. Resume previous
  3. Resume later
  4. Resume next
  5. Resume before
  6. Resume to
  7. Resume statement
  8. Resume application
39. If the CancelError Property of the CommonDialog Box is set to true then which of the following statement is true:
Answers:
  1. A runtime error can result if the user clicks the cancel button
  2. A compile time error occurs
  3. The program executes without any error
  4. You need to carry out conditional compilation
  5. None of the above
40. 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:
  1. DataSource
  2. Connection
  3. RecordSource
  4. TableType
  5. RecordType
  6. DataType
41. One can convert a Visual Basic Application into ActiveX Document using:
Answers:
  1. Visual Database Manager
  2. Application Wizard
  3. ActiveX Document Migration Wizard
  4. Package and Deployment Wizard
42. Which event of a text box would you use for validating the data entered by the user?
Answers:
  1. Validate
  2. Validation
  3. Check
  4. Audit
  5. GotFocus
  6. Checkdata
  7. ValidateDate
43. Which events enable you to determine which key was pressed by the user?
Answers:
  1. Click and KeyPress
  2. Click, KeyUp and KeyDown
  3. KeyUp and KeyDown
  4. KeyPress, KeyUp and KeyDown
  5. Click, KeyPress, KeyUp and KeyDown
44. Which event occurs only once in the entire life cycle of an ActiveX control?
Answers:
  1. Initialize
  2. Resize
  3. Terminate
  4. WriteProperties
  5. InitProperties
  6. Activate
  7. None of the above
45. Only Controls with a ________ property such as Picturebox, Toolbox, Statusbar etc. can be placed on an MDI form:
Answers:
  1. Showtips
  2. Negotiate
  3. Align
  4. BorderStyle = 0
  5. Visible
  6. Locked
  7. Enabled
  8. Tag
46. The _______ function enables a VB application to make use of the idle time and to respond periodically to events.
Answers:
  1. GetTime()
  2. TrapEvents()
  3. GetDate()
  4. DoEvents
  5. Kill
  6. Idle
  7. Events
  8. Call
47. How many root nodes can a TreeView control have?
Answers:
  1. 1
  2. 2
  3. 3
  4. 4
  5. 5
  6. 10
  7. Upto 50
  8. No limit
48. 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:
  1. Background color property
  2. Caption property
  3. ZOrder property
  4. AutoRedraw property
  5. SendtoBack property
  6. BringtoFront property
  7. Hide property
  8. Show property
49. What is the default value for the scalemode property of the form?
Answers:
  1. Twip
  2. Point
  3. Pixel
  4. Character
  5. Centimeter
  6. Inches
  7. Millimeters
50. Which of the following ADO recordset types provides the greatest degree of concurrency?
Answers:
  1. Static
  2. Forward-only
  3. Dynamic
  4. Keyset
  5. Read only
  6. Keyset and Dynamic
51. Which collection of an ActiveX.. control enumerates all of the properties that can be bound to a data source?
Answers:
  1. DataFields
  2. DataMembers
  3. DataBindings
  4. DataProperties
  5. DataBase
  6. DataColumns
52. Which object is used for error handling?
Answers:
  1. Error
  2. Err
  3. OnError
  4. App
  5. Application
  6. AppErr
  7. Exception
53. The _______ property enables Visual Basic to draw complete images in memory before displaying them on the Screen.
Answers:
  1. AutoRedraw = True
  2. AutoRedraw = False
  3. Refresh
  4. PaintPicture
54. Which event should be used to resize an ActiveX control as the user modifies the size of the control implementation on a form?
Answers:
  1. Resize
  2. Paint
  3. Repaint
  4. Initialize
  5. Change
  6. ReDimension
  7. Dimension
  8. Any of the above
55. Which event is fired when a text box loses focus?
Answers:
  1. LostFocus
  2. FocusLost
  3. RemoveFocus
  4. FocusAway
  5. NoFocus
  6. Leavefocus
  7. Validate
56. Which of the following approaches to data modifications is the least efficient?
Answers:
  1. Updating through a cursor using a recordset
  2. A stored procedure
  3. An update statement prepared and executed
  4. An update statement executed directly
  5. Updating through a data control
57. How can you keep the user from exiting a form by clicking the Close button?
Answers:
  1. Place code in the Terminate event
  2. Place code in the Unload event
  3. Place code in the QueryUnload event
  4. This can only be done by using the Windows API
  5. Place code in the Load event
  6. Place code in the Deactivate event
  7. None of the above
58. In order to provide a transparent background to the Form, you must change the _________ property to _______.
Answers:
  1. BackStyle, Opaque
  2. BackColor, White
  3. BackStyle, Transparent
  4. BackColor, Parent Window’s Color
  5. ZOrder, 0
  6. BackColor, Transparent
59. What do CurrentX and CurrentY return?
Answers:
  1. Current X and Y co-ordinates of mousepointer
  2. Current X and Y co-ordinates of cursor
  3. A String of X & Y
  4. Current x and y co-ordinates of the control
60. Which property of the ProgressBar determines how much of the bar is filled?
Answers:
  1. Min
  2. Max
  3. Value
  4. CurrentVal
  5. FillValue
  6. Fill
  7. BarComplete
61. The _______ method loads the form named ‘Form1’ in to memory and also displays it.
Answers:
  1. Load Form1
  2. Form1.Show
  3. Form1.Visible = True
  4. Unload Form1
  5. Form1.activate
62. Which of the following cannot be included in the Open method of the recordset?
Answers:
  1. Cursor Type
  2. User Name
  3. Active Connection
  4. CursorLocation
  5. LockType
  6. Source
63. The caption and the name properties of the command button:
Answers:
  1. Are one and the same
  2. Can be different at times
  3. Are actually not properties
64. Which of the following statements forces inline error handling?
Answers:
  1. On Error GoTo linelabel
  2. On Error GoTo Inline
  3. On Error Stop
  4. On Error Resume Next
  5. On Error GoTo 0
  6. On Error Resume
  7. None of the above
65. Which of the following debug tools would you use to locate your current position in a series of embedded procedure calls?
Answers:
  1. Locals window
  2. Immediate window
  3. Watch window
  4. Callstack
  5. Debug object
66. Which of the following can be shown to the user using the Common Dialog control in VB?
Answers:
  1. Common messages passed to Windows
  2. Open dialog box
  3. Windows explorer
  4. Input box
  5. Message box
  6. Error messages
  7. Help
  8. None of the above
67. 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:
  1. The Caption of Form1 will change to the value contained in Y$
  2. The Caption of Form1 will not change
  3. The Caption changes at random intervals after the function call
  4. The code is incorrect
68. Visual Basic fires the _______ event everytime a part of the form is newly exposed.
Answers:
  1. Load
  2. Activate
  3. Paint
  4. Show
  5. Initialize
69. What does the forms collection contain?
Answers:
  1. A list of all forms in a project
  2. A list of all hidden forms
  3. A list of all currently loaded forms
  4. A list of all visible forms
  5. All the child forms of an MDI application.
70. 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
Answers:
  1. You do not need to use the Set command here
  2. You do not have the permission to access the class
  3. MyVar has not been declared
  4. You do not need to use the New keyword here
  5. None of the above
71. What is the sequence of events when a form is unloaded?
Answers:
  1. QueryUnload, Unload and Terminate
  2. QueryUnload, Terminate and Unload
  3. QueryUnload and Unload
  4. Unload only
  5. Terminate, QueryUnload and Unload
  6. Terminate, Unload and QueryUnload
  7. Unload, QueryUnload and Terminate
  8. Unload, Terminate and QueryUnload
72. In order to change the mouse pointer shape from glass to watch-glass, the property to be used is:
Answers:
  1. MousePointer
  2. Picture
  3. Menu
  4. PointerStyle
  5. Pointer
  6. Cursor
  7. CursorStyle
  8. CursorShape
73. The _______ method resets the contents of bound controls to their original values when the user clicks on the cancel button.
Answers:
  1. UpdateControls
  2. PaintPicture
  3. Refresh
  4. Resize
  5. Resync
  6. Restore
  7. Cancel
  8. Update
74. Which of the following are not properties of Command Button:
Answers:
  1. Caption
  2. Visible
  3. Multi-Line
  4. Font
  5. Name
  6. Bold
  7. Tag
  8. Enabled
75. Which form event would you use to activate a pop-up menu when the user clicks the right mouse button?
Answers:
  1. Click
  2. MouseMove
  3. DragOver
  4. DragDrop
  5. MouseUp
  6. Mouse-popup
  7. PopupMenu
  8. ShowMenu
76. What does the controls collection contain?
Answers:
  1. A list of all controls on a form
  2. A list of all the controls used by your program
  3. A list of all text boxes on a form
  4. A list of all visible controls
  5. The names of all control arrays on the form
77. The interval property of the Timer control specifies the time in:
Answers:
  1. Milliseconds
  2. Seconds
  3. Minutes
  4. Hours
  5. Either milliseconds or seconds
78. Which of the following compiled elements does not run in process?
Answers:
  1. ActiveX EXE
  2. ActiveX DLL
  3. ActiveX Control
  4. MTS Component
  5. Standard DLL
  6. Standard Exe
79. Which method will you use to remove a form from the Screen but retain it in memory?
Answers:
  1. Show method
  2. Unload method
  3. Hide method
  4. CLS method
  5. Deactivate method
80. Global Procedures and Global Variables are declared in:
Answers:
  1. Form Modules
  2. Standard (Code) Modules
  3. Class Modules
  4. Resource files
  5. ActiveX Controls
  6. Data Environment
81. What is the sequence in which the following events are triggered when a form is loaded?
Answers:
  1. Initialize, Load, Resize and Paint
  2. Initialize, Load, Paint and Resize
  3. Load, Initialize, Resize and Paint
  4. Load, Initialize, Paint and Resize
  5. Initialize, Resize, Paint and Load
  6. Load, Paint,Initialize and Resize
  7. Initialize, Paint, Load and Resize
  8. Paint, Resize, Initialize and Load
82. An ADO dynamic property is:
Answers:
  1. A property that changes value at runtime
  2. A value defined by the user
  3. A value defined by the operating system
  4. A property that dynamically resizes as needed to accommodate database parameters
  5. A property implemented by the OLE DB service provider
83. Which event is triggered when the user moves to another open form?
Answers:
  1. Unload
  2. QueryUnload
  3. Deactivate
  4. Terminate
  5. Load
  6. Initialize
  7. Repaint
  8. Resize
84. Which event procedure is called only if AutoRedraw property is set to false:
Answers:
  1. Form_GotFocus
  2. Form_Paint
  3. Form_Activate
85. 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:
  1. Caption
  2. ClipControls
  3. UseMnemonic
  4. LinkMode
  5. Locked
  6. Label
  7. ZOrder
  8. Visible
86. In order to access a file in Non-textual format, you have to open file in:
Answers:
  1. Ascii Format
  2. Binary Format
  3. Input Mode
  4. Output mode
  5. Append mode
  6. Read Mode
87. Which three methods does the collection object support?
Answers:
  1. Let, Get, Set
  2. Load, Unload, Count
  3. Add, Remove, Item
  4. Add, Delete, Index
  5. Add, Remove, Sort
  6. Add, Remove, Count
  7. Add, Delete, Count
  8. Add, Set, Count
88. The vbCritical symbol displays:
Answers:
  1. A warning query icon
  2. A critical message icon
  3. A warning message icon
  4. An exclamation icon
  5. None of the above
89. To save a file in a RichTextBox Control and a picture in a Picture Box Control, you will use the _________ and __________ statements, respectively:
Answers:
  1. RichText1.SaveFile, Picture1.SavePicture
  2. RichText1.LoadFile, Picture1.LoadPicture
  3. RichText1.SavePicture, Picture1.SaveFile
  4. RichText1.LoadPicture, Picture1.SaveFile
90. The ______ property is used to show Tool Tips or Help Balloons when the mouse rests on the object:
Answers:
  1. ToolTipText
  2. Tag
  3. Dragmode
  4. ShowTips
  5. Help
  6. Tip
  7. ShowHelp
  8. Tab
91. 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:
Answers:
  1. Cancel parameter to a non-zero value
  2. Cancel parameter to 0
  3. UnloadMode parameter to a non-zero value
  4. UnloadMode parameter to a zero value
  5. UnloadMode parameter to 1
  6. Cancel parameter to 1
92. Which line of the following code contains an error?
1 public Sub Command1_Click()
2 Dim str As String
2 str = “Hello World”
3 i = val (str)
4 length = strlen(str)
5 Msgbox “No Of Characters in ” & str & ” = ” & CSstr(length)
6 End Sub
Answers:
  1. Error on line 1
  2. Error on line 2
  3. Error on line 3
  4. Error on line 4
  5. Error on line 5
  6. Error on line 6
  7. No Error
93. Visual Basic displays information depending upon the current value of two properties of the form, called as:
Answers:
  1. CurrentX and CurrentY
  2. ScaleLeft and ScaleTop
  3. ScaleHeight and ScaleTop
  4. x and y
  5. TopX and TopY
  6. LeftX and LeftY
94. After a Dynaset type recordset has been created and opened, further searching is possible using the:
Answers:
  1. LookUp method
  2. Seek method
  3. Locate method
  4. FindNext method
  5. Search method
95. What is the purpose of the Class Builder add-in in Visual Basic:
Answers:
  1. To add classes to the current project
  2. To change the current project to a class based project
  3. To create new classes and define their properties, methods & events
  4. To draw out how the application model will look
96. Which events allow you to determine if a Control or Shift key was pressed by the user?
Answers:
  1. Click and KeyPress
  2. Click, KeyUp and KeyDown
  3. KeyUp and KeyDown
  4. KeyPress, KeyUp and KeyDown
  5. Click, KeyPress, KeyUp and KeyDown
  6. KeyPress and KeyUp
97. You can create menus by the ________ and _________.
Answers:
  1. Menu Editor, Application Wizard
  2. Menu Editor, Win32 API
  3. Win32 API, Application Wizard
  4. Class Builder, New Application Wizard
98. The ______ function can be used to run any .com, .exe, .bat or .pif file from a Visual Basic program.
Answers:
  1. Shell
  2. Substr
  3. SetAttr
  4. CStr
  5. Exec
  6. Perform
  7. Do
  8. None of the above
Finally no more words require about the VISUAL BASIC TEST  information in this session of this content. If you are require knowing more, Please ask to us via our contact us form or comment box. Please make sure that, you don’t send Personal information via the Comment box.  Thank you very mutch for being with us

0 comments: