VB 6 Desktop 2
Terms
undefined, object
copy deck
-
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?
- 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 T -
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 - 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 projec - 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 Proper - 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
ms - 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
- 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 neces
- 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
-
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
- 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 -
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
- 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 - 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 - 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 re
- 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 - 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
-
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 whic
- 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 - 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 ad
- 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, a -
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 usi
- 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 propert
- 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 us - b) by using an Err.Raise statement to raise a custom error message