This site is 100% ad supported. Please add an exception to adblock for this site.

VB 6 Desktop 5

Terms

undefined, object
copy deck
When a variable is defined at the form level as Private dblVehId as double, what is the widest range from which dblVehID can be referenced?
widest range from which dblVehID can be referenced?
a)Within the form
b)Within all procedures
a)Within the form
Assume you have a DataEnvironment object with a Connection object named conOracle. It contains two Command objects named cmdEmployee and cmdCustomer. frmEmployee has controls bound to cmdEmployee, and frmCustomer has controls bound to cmdCustomer. Both a
c) Changes to both cmdEmployee and cmdCustomer are lost.
You have created an ActiveX control. The InvisibleAtRuntime property was set to True when you created it. It performs some currency exchange calculations for your order-entry application. The ActiveX control has a bug in it that causes it to crash every
c) COM EXE
Describe ByVal arguments in a DLL function declaration.
a)Exact values
b)Object variables
c)Unicode values
d)Callback pointers
a)Exact values
Consider the following code:
Dim sName()
ReDim sName(5)
sName(3) = "Smith"
Erase sName
Which of the following statements is true?
a) All memory is released. The array sName needs to be declared again using ReDim be
a) All memory is released. The array sName needs to be declared again using ReDim before it can be reused.
What does the GetSetting function do?
a)Retrieves values from a property
b)Retrieves values from the registry
c)Retrieves environment variables
d)None of the above
b)Retrieves values from the registry
Assume that you create a new Visual Basic project, choosing an ActiveX control as the project type. To your control, you add the UpDown control followed by a ComboBox control and then a TextBox control. You set the properties of the UpDown control as fol
a) The ComboBox control
What functions can be used to record values in the Registry?
a)RegSave
b)SaveSetting
c)WriteSetting
d)SaveValues
b)SaveSetting
Your form has two TextBox controls occupying the exact same space (one is on top of the other). Assuming the following code snippet, with which TextBox control(s) can the user interact (that is, into which TextBox control[s] can the user type)?
Priv
a) Both
Consider the following code:
form1.Show
Dim newFrm As form1
unload form1
What memory is used by the object(s) remaining in memory (do not consider the few bytes of overhead to reference the object variable)?
A) None. The form has
C) The memory used by form1 is still being used.
You wish to boldface the text on every command button on every open form in your application. Which code snippet will accomplish this?
A) Visual Basic does not support this functionality.
B) Dim vButton As Variant
For Each vButton In Cont
D) Dim vForm As Variant
Dim vButton As Variant
For Each vForm In Forms
For Each vButton In vForm.Controls
If TypeOf vButton = CommandButton Then
vButton.FontBold = True
End If
Next
Next
Which of the following are in-process COM components? [Check all correct
answers]

a) ActiveX DLL
b) ActiveX EXE
c) ActiveX control
d) Standard EXE
e) None of the above

a) ActiveX DLL
c) ActiveX control
You have a form with a single TextBox control. As you can see in Exhibits 1
and 2 (Figures 15.1 and 15.2), the Cut and Copy menu items are enabled when
text is highlighted and disabled when text is disabled. Where is the most
likely place
c) The Edit menu's Click event procedure.
You want to step through the code contained in your ActiveX Control project line by line when in break mode. How can this be accomplished?
a) Open a second instance of Visual Basic, start a Standard EXE project, and add an instance of the control to
c) Add a Standard EXE project to your project to create a project group. Add an instance of the control to a form in the added project and step through the code like normal.
Assume rs is an open ADO Recordset object consisting of 37 rows. Further, assume that it supports forward and backward navigation, bookmarks, and record counts. What will happen when the following code executes?
Dim iRecNo As Integer
With rs
f) An error will occur.
You have a form with four text boxes on it and need to intercept keystrokes for all four text boxes. Which of the following solutions is best?
a) Use the KeyPreview method of the form.
b) Use the TestKey event of the OLE keyboard object inserte
c) Use the KeyDown or KeyPress events of each of the text boxes.
You have created several Watch variables to assist in debugging your application. When looking at the values for Watch variables configured with limited scopes, you notice an unusual value assigned to the variables when they are currently out of scope. W
b) <out of context>
Your application has opened an ADO Recordset. In your code, you have coded an error handler that specifies On Error Resume Next followed by a line of code that invokes the MoveLast method of the Recordset object. Under which of the following circumstance
c) When both BOF and EOF are True
You create a COM DLL with Visual Basic and write a client program that references certain methods of the objects exposed by the DLL. The objects are explicity declared. What type of binding will result?
a) DispID
b) vTable
c) DispID if the
b) vTable
How would you access an ODBC data source with the ADO Data control?
a) Use the RDO UserConnection interface.
b) Use the OLEDB Provider for ODBC.
c) Set the DefaultCursor property to ODBCDirect.
d) Use a translation table with SQL Serv
b) Use the OLEDB Provider for ODBC.
A Data Link creates which object(s)?

a) Command
b) Connection
c) Recordset
d) Either a or c
b) Connection
Which of the following will add a Node object to a TreeView control?
a) Dim myNode As Node
Set myNode = TreeView1.Nodes.Add(,,"C:\","Root")
b) Treeview1.Add ("C:\",tvwParent)
c) TreeView.Node.Add ("C
a) Dim myNode As Node
Set myNode = TreeView1.Nodes.Add(,,"C:\","Root")
Which is not an event of the TextBox control?
a) GotFocus
b) MouseMove
c) Validate
d) None of the above
d) None of the above
How can the actions and visual interface of the Package and Deployment Wizard be customized?
a)Modify the setup toolkit project.
b)Modify setup.lst.
c)Modify setup.stf.
d)Edit setup.ini.
a)Modify the setup toolkit project.
What does it mean when a component is marked as Safe for Scripting in the Package and Deployment Wizard?
a)The component is now capable of being used in Netscape.
b)The component is now capable of being called by VBscript code.
c)The compo
c)The component should not be capable of doing any damage on systems.

Deck Info

25

permalink