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 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 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 create a Visual Basic application that uses conditional compilation to enable and disable elements of functionality. Which two mechanisms can you use to set conditional compilation constants? (Choose two) A. The dim statement. B. The const statement. C. The #const directive. D. The project properties dialog box. E. The project reference dialog box.
Answer: C, D.
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.
You are debugging a local procedure. Visual Basic is in break mode. There are five local integer variables declared in the procedure. You want to assign new values to these five variables before you continue running code. How can you do this? (Choose two) A. Use the Immediate Window to execute assignment statements for each variable. B. Highlight each value in the watch window and type in each new value. C. Type the new value directly into the source code. D. Highlight each value
Answer: A, D.
Your Visual Basic application contains the following Sub procedure: Private Sub Increase Number (ByVal iNumber as Integer) Dim iCounter As Integer For iCounter = 1 To 5 iNumber= iNumber + 1 Next iCounter End Sub This subroutine is part of the code for a form named Form1. You define a watch expression on the variable iNumber so that you can examine its value. You want to see the value of iNumber only when Increase Number is executing. What should you do? A. Set the module context
Answer: A.
You are debugging a Visual Basic program that uses a module named basString. The module contains many functions. You suspect that there are logic errors in both the FindNextSeparator procedure and the FindNextToken procedure in this module. Each of these procedures uses a local variable named intChars. FindNextToken includes a call to FindNextSeparator. FindNextToken is called form a procedure named Process String in a basMain that is in the program. You want to use the Watch window
Answer: C.
You are using Visual Basic to debug a procedure. You want to change the value of a variable in break mode while stepping through the procedure. How can you do this?A. Open the Locals window, click the value in the value column, and type in a new value. B. Open the Locals window, and type an expression in the expression column to evaluate the desired value. C. Open the watch window, click the value column, and type in a new value. D. Open the watch window, and type an expression in
Answer: A.
You develop a Visual Basic application that contains a class module named Notify. You want tour application to asynchronously communicate with a COM component named CCVerify. This component supplies credit card verification services to many applications. Each of the client applications will have its own implementation of the Notify class. Each client contains a reference to the CCVerify component, which exposes a Notify interface for this class. To enable this communication, a reference
Answer: A.