• 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

Card Range To Study

through

image

Play button

image

Play button

image

Progress

1/25

Click to flip

Use LEFT and RIGHT arrow keys to navigate between flashcards;

Use UP and DOWN arrow keys to flip the card;

H to show hint;

A reads text to speech;

25 Cards in this Set

  • Front
  • Back
Within a VB procedure, you write error handling code to specifically trap and react to error number 31001, You need to test the effectiveness of the error handling. Which line of code will simulate error 31001?
A. Err.Raise 31001
B. Debug.Assert 31001
C. Err.Raise "31001"
D. Debug.Assert "31001"
Answer: A
Cindy has been instructed to copy the current Visual Basic project files and ActiveX controls from the network to a new computer at her desk. After the files have been copied, she installs and runs Visual Basic. However, when she opens one of the projects, she gets an error message stating that one of the third-party ActiveX controls could not be loaded. What must Cindy do to add the control to her project?
A. She must browse for the control from the References dialog box and select the control's check box.
B. She must browse for the control from within the Components dialog box, select the control and click Open.
C. She must first register the control using Regsvr32.exe. She must then select the control's check box from within the References dialog box.
D. She must first register the control using Regsvr32.exe. She must then select the control's check box from within the Components dialog box.
Answer: B
You want to deploy a Windows application in a large organization. What must users do to install your application on their computers?
A. Have users connect to a Web Page that hosts the main setup program for the application setup.exe.
B. Have users run the main setup program for your application setup.exe from a shared network drive
C. Have users connect to a Web Page that hosts the cab file for the application
D. Have users install the application using floppy disks that have the setup.exe program for the application
Answer: B
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
Answer: B
Which two characteristics of services should influence you to implement them as out-of-process COM components? (choose two)
A. The service involves lengthy calculations or report generation.
B. The service requires frequent interaction with the user.
C. The service is memory intensive and frequent used in the application.
D. The service might cause the application to crash when as unhandled eXception occurs within the service.
E. The service involves database operations or other transaction-oriented tasks.
Answer: A, D

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
Answer: D
The iUnknown interface is the primary interface from which all COM interfaces must be derived. Which member functions are exposed by the iDispatch interface in addition to those exposed by iUnknown?



Answer: Invoke, GetIDsOfNames, GetTypelnfo, GetTypeInfoCount
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.


Answer: A
Which type of version compatibility does this paragraph describe?
Visual Basic preserves the type library information from the previous version. Components that currently use an earlier version will continue to work.
A. Binary Compatibility
B. Project Compatibility
C. No Compatibility
D. Binary and Project Compatibility

Answer: A

Your Visual Basic application contains a form named Forml. Forml contains a StatusBar control named MyBar that consists of five Panel objects. Which line of code will display the text Please Wait ...in the second Panel object of this control?
A. MyBar.Panels(1).Text = "Please Wait..."
B. MyBar.Panels(2).Text = "Please Wait..."
C. MyBar.Panels(1).Caption = "Please Wait..."
D. MyBar.Panels(2).Caption = "Please Wait..."




Answer: B
How do you declare an object variable z to sync events from a COM component called ServerE?
A. Dim Event z as ServerE
B. Dim WithEvents z as ServerE
C. Dim z as New ServerE
D. Dim z as ServerE

Answer: B
You are design a VB application that will facilitate the billing process for hospitals. The billing calculations performed by the application are based on laws that are likely to change in the future. When these laws change, you will need an easy way to make modifications to your application. You want to ensure that changes to the billing algorithm will not force you to recompile the entire application. You do not want to redistribute the application. How should you design this application?
A. place all of the billing logic in COM components that reside on a central server.
B. place all of the billing logic in a separate code module and only recompile this module when the billing logic changes.
C. use conditional compilation statements to control which code segments should be executed
D. Build an ActiveX Control that implements business logic. Change the progid and the clsid of the control when the billing logic is modified.


Answer: A
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.
Answer: A
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
Answer: B
You are placing a Toolbar control on your VB form. You want to specify a different action for each toolbar button. Which select case statement should you use in the buttonclick event handler to specify each action?
A. select case button.click
B. select case button.key
C. select case button.item
D. select case button.index
Answer: B
You want to create a Visual Basic class. You want each instance of the class to represent a record in a database table. How can you accomplish this?
A. Create a new Visual Basic project based on the Data Project template. Set the ConnectionSource property of the DataEnviron object to refer to the Appropriate DSN.
B. Create a class module that queries the desired table in the database. Provide a property Get method for each field in the table.
C. Run the Visual Data Manager Add-In. Select the correct database and table use the Copy Structure command to generate the wrapper class.
D. Create a new ADO Recordset object. When the Execute method of the ADO Recordset object is invoked, supply the table name as the CommandString argument and adCmdTable as the Option argument.
Answer: D
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.
Answer: A
How do you display a Pop Up menu mnuPopUp on Form1 in an application?
A. Form1.mnuPopUp.Show
B. Form1.PopUpMenu "mnuPopUp"
C. Form1.PopUpMenu mnuPopUp
D. Form1.Menu.Show "mnuPopUp"



Answer: C


You create a VB application that uses the MS IE object model. You include the following code in the general declarations section of a form-level module.
private olE as New InternetExplorer
When will vb instantiate this object?
A. when the form is loaded
B. when the form is displayed on the screen
C. when the declaration is executed
D. when the object is first referenced in your code
Answer: D

Your component is run but there is an error on the server side. The error is corrected and rerun. This time there is an error on the client side. What do you do?
A. Recompile client side using binary compatibility
B. Recompile server side using binary compatibility
C. Recompile server side using no compatibility
D. Recompile client side using no compatibility

Answer: A
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"
Answer: D
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


Answer: D
You want to deploy an internet application in a large organization. How is this best done?
A. Have users connect to a Web Page that hosts the main setup program for the application setup.exe
B. Have users run the main setup program for your application setup.exe from a shared network drive
C. Have users connect to a Web Page that hosts the cab file for the application
D. Have users install the application using floppy disks that have the setup.exe program for the application.




Answer: C
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. ACTIVE DOCUMENT
Answer: A

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.
Answer: B