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 are asked to use Visual Basic to create a Human Resources application that will maintain, among other things, employee information. In designing application, you delete to encapsulate the business logic into a COM EXE named HRManager.exe. Within the user interface portion of your application, you want to create an instance of the Employee object exposed by HRManager.exe Which two code fragments will instantiate an Employee object variable? (Choose two) A. Set oEmployee = New HRManager.Employee
Answer: A, B.
You use Visual Basic to create a form with an ADO Data control named ADODC1 and a TextBox control named Text1. The TextBox control must be bound every time the form is loaded. You want to dynamically bind data from the CustomerID field to be displayed in the text box. Which code fragment can you use to accomplish this? A. Set Text1.DataSource= "ADODC1" Text1.DataField = "CustomerID" B. Set Text1.DataSource= ADODC1Set Text1.DataField = "CustomerID" C. Text1.DataSource=
Answer: D.
You want to use Visual Basic to package and deploy your ActiveX control. You also want to restrict the use of your control at design time to authorized developers only. How can you do this?A. Before compiling your control, set the version Compatibility option to No Compatibility. B. Using the package and deployment Wizard, digitally sign your ActiveX control. C. Include licensing with your ActiveX control. D. Set your ActiveX control to read-only.
Answer: C.
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 create a Visual Basic ActiveX control that you want to distribute on internet Web pages. You want your control to automatically install from your web site to a client computer. What should you do?A. Create a .cab file by using the package and deployment wizard. Compress the .cab file, and transfer it to your server by using FTP. B. Create an .exe file by using the package and deployment wizard. Transfer it to your Web server by using FTP. C. Create a single .cab file by using the package and
Answer: C.
You create a Visual Basic application that you want to distribute on CD-ROM. You want the setup application to automatically execute when users insert the CD-ROM into their CD-ROM drives. How can you accomplish this? A. Add an Autorun.inf file to the root directory of the CD-ROM. B. Make sure the setup application is named Autorun.exe. C. Add the line Autorun=1 to the project .inf file produced by the Package and deployment wizard. D. Add the name of your setup application to the startup section
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.