Study your flashcards anywhere!

Download the official Cram app for free >

  • Shuffle
    Toggle On
    Toggle Off
  • Alphabetize
    Toggle On
    Toggle Off
  • Front First
    Toggle On
    Toggle Off
  • Both Sides
    Toggle On
    Toggle Off
  • Read
    Toggle On
    Toggle Off
Reading...
Front

How to study your flashcards.

Right/Left arrow keys: Navigate between flashcards.right arrow keyleft arrow key

Up/Down arrow keys: Flip the card between the front and back.down keyup key

H key: Show hint (3rd side).h key

A key: Read text to speech.a key

image

Play button

image

Play button

image

Progress

1/24

Click to flip

24 Cards in this Set

  • Front
  • Back
Each order can have multiple items. When you attempt to create a report with the Data Report designer to show items for each customer, you are unable to get items for each order, but you do see the Orders. What is a possible cause of this problem?
a) The Parent property for the Orders command is not set to the Customers Command.
b) The Items command has been added as a parallel child command under the Customers command
c) The Parent property for the Orders command is not set to the items command
d) The DataMember property of the data report is not set to the items command
c) The Parent property for the Orders command is not set to the items command
You want to provide context-sensitive Help in your Visual Basic Application. Which steps must you take?(choose three)
a) In the OnMouseOver event, include code to open the HelpPile
b) Set the Help file name for the project.
c) Set the ToolTipText property on each object for which you plan to provide Context-sensitive Help.
d) Create a skeleton application with the Context-sensitive Help option set to True.
e) Use an ASCII editor to create an .rtf file, and insert a tag for each topic. Then use the CHM compiler to generate the Help file.
f) Create the Help document and compile it.
g) Assign values to the HelpcontextlD property on each object for which you plan to provide context-sensitive Help.
b) Set the Help file name for the project.
f) Create the Help document and compile it.
g) Assign values to the HelpcontextlD property on each object for which you plan to provide context-sensitive Help.
You use VB to create a menu that will display a list of the most recently used files. The number of files that are included in the list will be set at run time. What must you do to display the menu with the listed files at run time?
a) redimension the menu control array.
b) use load statement to create a new instance of the menu item
c) use the add method to add each item to the menu
d) use the show method to instantiate the menu
b) use load statement to create a new instance of the menu item
You create an ActiveX control that display a graph depicting distribution. You want to be able to place this control on a form in your VB project. What must you do?
a) Add the control to the toolbox by using the components dialog box for the project.
b) set a reference to the control in the references dialog box for the project
c) import the control by using the object browser.
d) add the control to a form, and link it back to the distribution project.
a) Add the control to the toolbox by using the components dialog box for the project.
You have created a class module and are adding a property that is to be exposed for read/write access. What statement(s) will accomplish this?
a) Property Get and Property Let
b) Property Let
c) Property Get
d) Property Let and Property Set
a) Property Get and Property Let
Create one of these objects requires considerable time. One procedure in your application contains the following code.
function maybeprintinventory(fprint as boolean)
'insert code here
if fprint then
owarehouse.number=100
msgbox.owarehouse.inventory
end if
end function
You want to instantiate the warehouse object only if it is needed. Which code fragment should you insert in place of "insert code here"
a) dim owarehouse as new warehouse
b) dim owarehouse as new object
c) dim owarehouse as warehouse
set owarehouse=new warehouse
d) dim owarehouse as object
set owarehouse= new warehouse
a) dim owarehouse as new warehouse
The user may edit the value displayed in the txtcreditlimit text box and then click a command button named cmdsubmit to send the edited value back to the database. The cmdsubmit command button should only be enabled when the txtcreditlimit control has a value of 25000 or less. Which event should you use to perform this validation?
a) the Change event of the txtcreditlimit control
b) the Queryunload event of the form
c) the lostfocus event of the txtcreditlimit control
d) the lostfocus event of the form
a) the Change event of the txtcreditlimit control
COM clients that use this COM DLL must be able to retrieve information on the service objects, but should not be able to create new service objects, internally, the COM DLL maintains a pool of service objects and uses them to provide information as necessary. What value should you choose for the instancing property of the service class?
a) Singleuse
b) PublicNotCreatable
c) Multiuse
d) Globalmultiuse
b) PublicNotCreatable
Your Visual Basic application has two forms named Form1 and Form2, Forml has a ComboBox control named cboCompany, Form2 has a TextBox control named txtClient. Every time Form2 receives the focus, you want the text box to display the current value of the ComboBox on Form1. Which event procedure should you use for this purpose?
a) Private Sub Form_Activate()
TxtClient = Forml.cboCompany
End Sub
b) Private Sub Form_Initialize()
TxtClient = Forml.cboCompany
End Sub
c) Private Sub Form_Load ()
TxtClient = Forml.cboCompany
End Sub
d) Private Sub Form_GotFocus ()
TxtClient = Forml.cboCompany
End Sub
a) Private Sub Form_Activate()
TxtClient = Forml.cboCompany
End Sub
You are using Visual Basic to design a COM component that will allow the user to enter an IP address in the format nnn.nnn.nnn.nnn. This component will be used as part of a form by many applications within your company. The component must encapsulate the logic that controls whether a particular IP address should be accessible to a particular user. If the address is inaccessible, the component should set the address back to all zeros. Which type of COM component should you create?
a) Data-aware class
b) COM DLL
c) COM EXE
d) ActiveX Control
d) ActiveX Control
You use VB to create an in-process COM component. You want to register this component on a user's computer. How can you register this component?(choose two)
a) register the component by using the regsvr32.exe application
b) run the component by using the run command from the start menu
c) launch an application that makes use of the component
d) create a setup program for the component by using the PD&W
e) use the visual component manager to register the component
a) register the component by using the regsvr32.exe application
d) create a setup program for the component by using the PD&W
You are using VB to create a COM component that will encrypt a string supplied to it by a client application. Encrypting this string might take considerable time. You want to allow the client application to perform additional work while the encryption is being completed. Which type of COM component should you use?
a) COM EXE
b) COM DLL
c) ActiveX Control
d) ActiveX Document
a) COM EXE
Your company uses visual component manager to share components between developers. How can you make your new control available in visual component manager?
a) Drag the usercontrol designer from the visual basic design space to the visual component manager.
b) Drag the .ocx file from microsoft windows explorer to the contents pane of the visual component manager
c) import the .vbp file for the activeX control project to the visual component manager
d) use the microsoft visual sourcesafe add-in to add the control to source code control
b) Drag the .ocx file from microsoft windows explorer to the contents pane of the visual component manager
You use Visual Basic to create a COM DLL. What must clients of this component do to use vtable binding instead of the slower binding?
a) Ensure that the latest version of Msvbvm6C.dll is installed on the client computers
b) Use explicit class names when declaring variables supplied by your server.
c) In the Procedure Attributes dialog box, set a procedure ID for every public method and public property of your classes.
d) Require that developers of client applications use Visual Basic or Microsoft Visual J++ instead of Microsoft Visual C++.
b) Use explicit class names when declaring variables supplied by your server.
You implement error-handling code in a Visual Basic application. You specifically write code to trap for a division by zero. You are debugging the application in the IDE, the application interrupted when a division by zero error is raised. How can you resolve this behavior?
a) On the Tools menu, under Options, click Break on Unhandled Errors
b) Set the causesValidation property for the application to False.
c) Include the Resume Next statement in your error-handling routines.
d) Include the Resume statement in your error-handling routines.
a) On the Tools menu, under Options, click Break on Unhandled Errors
These routines are contained in a module named basError that is stored in a Visual Component Manger repository. What must you do to add this component to your project?
a) Select component in the Visual Component Manager explorer, click Republish on the shortcut menu, and then click ADD File on the Visual Basic Project menu.
b) Select component in the Visual Component Manager explorer, and click add to on the shortcut menu.
c) Select component in the Visual Component Manager explorer, click new component on the shortcut menu, and then double-click the module's icon in the toolbox
d) Select component in the Visual Component Manager explorer, read the description of the component to find out the riginalsourceproject, and copy the component from that project.
b) Select component in the Visual Component Manager explorer, and click add to on the shortcut menu.
You use VB to create a form with an ADO Data control named ADODCl and a TextBox control named Textl. The TextBox control must be bound every time the form is loaded. You want to dynamically bind data from the CustomerlD field to be displayed in the text box. Which code fragment can you use to accomplish this?
a) set textl.datasource="ADODCl"
textl.datafield="customerID"
b) set textl.datasource=ADODCl
set textl.datafield="customerID"
c) textl.datasource=ADODC1
textl.datafield="ADODCl.customerID"
d) set textl.datasource=ADODCl
textl.datafield="customerID"
d) set textl.datasource=ADODCl
textl.datafield="customerID"
Your VB form has a frame control named framel. Framel contains a control array named option1 that consists of two option buttons. As soon as an option button is selected, you want to disable certain textbox controls on the form and enable others. In which event must you write this code?
a) in the validate event of the control array.
b) in the click event of the control array
c) in the click event of framel
d) in the click event of each option button
b) in the click event of the control array
Users report that they need to restart your application to see changes made by other users to the data in this table. What is the most likely cause of this problem?
a) the ADO data control requires a MSSQLserver database to support multiuser access
b) by default, the ADO data control implements optimistic locking
c) by default, every user is opening the database exclusively
d) by default, the ADO data control uses a static cursor
d) by default, the ADO data control uses a static cursor
You use VB to develop a reusable component. To make classes in your project easier to use, you intend to add descriptive text and context-sensitive Help for each of the properties, methods, and events in the classes. Which procedure must you follow to add descriptive help information for each class?
a) open the code window for the class module, in the procedure attributes dialog box, enter a description and a HelpcontextlD for each procedure.
b) open the code window for the class module, in the procedure references dialog box, enter a description and a help context ID for each procedure.
c) open the code window for the class module, in the procedure properties dialog box, enter a description and a help context ID for each procedure.
d) open the code window for the class module. Add a property page, in the property page, add a field for a description and add a help context ID for each procedure.
a) open the code window for the class module, in the procedure attributes dialog box, enter a description and a HelpcontextlD for each procedure.
Your VB application uses a COM component. The COM component will communicate with your application by calling a method of one of your applications objects. What should your application do to enable this type of communication?
a) create an object, and pass the address of that object to the COM component by using the addressof operator
b) create an object, and pass a reference to the object directly to the COM component
c) create a callback function in a standard module, and pass the address of that function to the COM component by using the addressof operator
d) create a callback function in a standard module, and pass that function directly to the COM component
b) create an object, and pass a reference to the object directly to the COM component
The main form in your VB application contains a commandbutton control named cmdExit. The command button is used to close any open database connections and exit the entire application. If the user attempts to end the current MS windows session without using this button to exit your application, you want to display an alert and keep the current windows session running. In which event must you write this code?
a) in the click event of the command button.
b) in the termiante event of the main form.
c) in the unload event of the main form
d) in the Queryunload event of the main form
d) in the Queryunload event of the main form
You are using Visual Basic to create an ActiveX control that you want to distribute to other developers. You want to add an about box to your control to show your e-mail address. How can you implement this about box so that it is available in the property windows?
a) Add a new property page to your control project. Name this page about. Select the page in the Connect Property Pages dialog box.
b) Add a new form to your control project. Create a public procedure to show the form, and set its procedure ID to AboutBox.
c) Add a new form to your control project. Create a public procedure to show the form, and set its procedure ID to -4
d) Add a new UserControl object to your control project. Name this UserControl object about. Make this control the default control in the project.
b) Add a new form to your control project. Create a public procedure to show the form, and set its procedure ID to AboutBox.
One of the business rules implemented by this object is that inventory for an item can never be negative. How should the object inform the user interface when this business rule is broken?
a) by using the MsgBox function to show a message to the user
b) by using an Err.Raise statement to raise a custom error message
c) by using the Rollback method to discard the transaction
d) by using the LogEvent method to write to the event log
b) by using an Err.Raise statement to raise a custom error message