This site is 100% ad supported. Please add an exception to adblock for this site.

VB 6 Desktop 1

Terms

undefined, object
copy deck
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
a) place all of the billing logic in COM components that reside on a central server.
You and several other developers are working on a large Visual Basic project. The project team is using Microsoft Visual SourceSafe(VSS) for source code control. You make major Changes to one component within the project. You want to share these changes
d) Get the latest version of all components from VSS database. Test your New version with these components. If the project passes the tests, check your new version into the VSS database.
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
Each client contains a reference to the CCVerify component, which exposes a notify interface for this class. To enable this communication, a reference to notify must be passed from your application to CCverify. You must use the register method of CCverif
a) private pNotify As Notify
sub register(oNotify as notify)
set pNotify=oNotify
end sub
You create a COM DLL project named University and included two class modules named Student and Course. The Student class module has a method named GetID, instances of the Course class need to call the GetID method. However, you do not want any code outsi
b) Friend Function GetID() As Long
Your VB application includes a menu to display several options. This menu is configured as shown in the menu editor dialog box in the exhibit you want the menu to display a check mark in front of each option the first time the user selects it, and to tog
b) mnuoption.item(index).checked=Not mnuoption.item(index).checked
You have a ListBox control named lstCandidates on your Visual Basic form. When a user selects a name from the listbox you want the name to appear in a text box named txtName Which event procedure will achieve this?
a) Private Sub lstCandidates_Clic
a) Private Sub lstCandidates_Click()
TxtName = lstCandidates
End Sub
Which code snippet will return all settings from the Windows Registry
related to the "Test" application's "Colors" key?
a) Dim myVar As Variant
Dim myStr As String
For Each myVar In AllSettings
MyStr = GetS
d) Dim myVar As Variant
MyVar = GetAllSettings(appname := "Test", section := "Colors")
You are implementing a VB application. You add a number of controls to form. You want to associate a tooltip with each of these controls. How can you allow the display of tooltip information for controls in your application?
a) set the Tooltiptext
a) set the Tooltiptext property of each control to a string value that will be displayed as the tooltip.
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 p
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.
Cindy has been instructed her 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 pro
b) She must browse for the control from within the Components dialog box, select the control and click Open.
Which two characteristics of the 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
a) The service involves lengthy calculations or report generation
d) The service might cause the application to crash when an unhandled exception occurs within the service
You are deploying a VB application that connects to a SQL Server database using ODBC. Which option best describes the configuration of ODBC drivers?
a) The ODBC driver only needs to be installed on the server.
b) An ODBC driver needs to be inst
b) An ODBC driver needs to be installed on each client only
What properties need to be set to bind a text box control to an ADO data control?
a) DataSource and DataField
b) DataSource, DataField, and DataMember
c) DataSource, RecordSource, and DataField
d) DataSource, Connection, and DataField
a) DataSource and DataField
You use VB to create a form named frmTrack for tracking invoices. You want to create a new instance of frmTrack. Which code fragment will create a new instance of frmTrack?
a) Dim x as new frmtrack
x.show
b) Dim frmtrach as new form
a) Dim x as new frmtrack
x.show
You want to make it easy for developers to create new projects that automatically contain these components. You create a new project on your computer. You add the control to the toolbox. You then add the form to the project. What should you do next?
d)Check the project into MS visual sourcesafe. check out the project from each developer's computer.
You create a multiuser Visual Basic application that interacts with a database. You are using ADO and need an updateable, 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.
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 t
d) when the object is first referenced in your code
You VB application uses ADO to interact with a relational database. Users require the ability to update and browse records. You have an existing connection object named cndevserver and recordset object named rscustomers. You want to create a recordset. W
a) rscustomers.Open "Select * From tblcustomers", cndevserver, adOpenDynamic, adLockOptimistic
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.Ass
a) Err.Raise 31001
The Caller is notified asynchronously when the operation actually completes a caller of the AddCourse method defines a variable of type Courses. The Variable is named collegecourses. Which code fragment must a caller use to define collegecourses?
a
c) Dim WithEvents collegecourses As Courses
You decide 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 instanti
a) set oEmployee= New HRManager.Employee
b) set oEmployee= Createobject( "HRManager.Employee")
You use VB to create a COM DLL project named university. In this project you implement a class module named teacher. The teacher class module has a property named salary. This property must be accessible only from within the teacher class. How should you
b) Private property get salary() as long
Your VB form contains a text box used to enter phone numbers. You are writing code to validate each keystroke to make sure that only numbers are being entered. If a letter is entered, you want to display a warning dialog box and prevent the appearance of
a) keypress

Deck Info

24

permalink