You use Visual Basic to create a COM DLL project hat contains an ActiveX control named Car View and a class module named sales. You are debugging the interaction between the ActiveX control and a host container. During a debugging session, you want to examine the contents of variables that are only in Car View. How can you accomplish this?A. Set the module context in the Add Watch dialog box to Car View. B. Set the instancing property of sales to private. C. St the public property of Car View to
Answer: A.
You use Visual Basic 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 HelpcontextID for each procedure. B. Open the code Window for the class module.
Answer: A.
You create a multi-user Visual Basic application that interacts with a database. You are using ADO and need an updatable, disconnected recordset. You need to offer users the ability to add, update, and modify records. What must you do to accomplish this? A. Set the CursorType property to adOpenStatic, and set the LockType property to adLockBatchOptimistic. B. Set the CursorType property to adOpenDynamic, and set the LockType property to adLockPessimitic. C. Set the CurcorType property to adOpenDynamic
Answer: A.
You are using Visual Basic to create an ActiveX control that will provide a banner at the top of the container in which it is placed. When the developer adds your control to a container, you want to set the caption displayed in the lblCaption constituent control to match the name assigned to the control itself. Which code fragment should you use? A. Private Sub UserControl_InitProperties ()On Error Resume Next LblCaption.Caption = Extender.NameEnd Sub B. Private Sub UserControl_AmbientChanged (
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 Properties Window?A. Add a new property page to your control project. Name this 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 About Box.
Answer: B.
You are working on a Visual Basic application that displays summary information about files on your computer. This application is split into a COM server and a COM client, both written in Visual Basic. After compiling both the server and the client, you discover an error in your server code. You correct the error and recompile the server. When you run the client, you receive an error message stating; "Class does not support Automation or does not support expected interface." Which two
Answer: B, C.
Your Visual Basic application uses a middle-tier business object to store inventory information in a database. The middle-tier object can be created on the same computer as the calling program, or on a remote computer by using DCOM. One of the business rules implemented by this object is that the 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
Answer: B.
You are using Visual Basic to create a COM DLL. This COM DLL provides customer information to other applications for your company. The COM DLL exposes a customer object with properties representing all information that is needed by these other applications. Internally, your COM DLL uses an object named Row to retrieve customer information from a Microsoft SQL Server database. For increased speed in data access, your customer object exposes a property named Bookmark that can hold a recordset bookmark.
Answer: C.
You are helping to convert an application from Visual Basic forms to Active Documents so that it can be used in web browsers on the corporate intranet. You are revising code in docCustomer, an active document created from the frmCustomer form. The current code is as follows: Private Sub cmdInventory_Click() FrmInventory.Show End Sub The frminventory form has been converted to become the docinventory active document. Which procedure should you use to best preserve the functionality of
Answer: C.
You are using Visual Basic to debug a program that uses multiple procedures to process information. The program executes a Debug-Assert statement and places Visual Basic in break mode in a low-level utility procedure. You are not sure which procedure called this utility procedure. You want to find out the name of the calling procedure without losing the local context information. How can you do this? A. On the view menu, select Call Stack. B. On the debug menu, select Step out. C.
Answer: A.