Visual Basic : Test 1 (ver 1.3.00)

Click on the MOST correct answer



1 Which statement is true about MDI forms?
When an MDI child form has a fixed single border (BorderStyle = 1), Microsoft Windows determines its initial height, width, and position when it is loaded
When an MDI child form's border is sizable (BorderStyle = 2), it is loaded using its design-time Height and Width properties
When an MDI child form has a sizable border (BorderStyle = 2), Microsoft Windows determines its initial height, width, and position when it is loaded
When you load the MDI form, its children are automatically loaded

2 What is NOT true about MDI forms?
When an MDI form is unloaded, the QueryUnload event is invoked first for the MDI form and then for every child form that is open
When a child form is minimized, its icon appears on the taskbar
You cannot show an MDI child form or the MDI form modally (using the Show method with an argument of vbModal)
When you load a child form, its parent form (the MDI form) is automatically loaded and displayed

3 What is not true about MDI Forms?
You can't place a control directly on a MDI form unless the control has an Align property or no visible interface
When a child form is maximized, its caption is combined with the caption of the MDI form and is displayed in the MDI form's title bar
The active child form's menus are displayed on the MDI form's menu bar, not on the child form
You can use the AutoLoadChildren property to load MDI child forms and leave them hidden until they're displayed using the Show method

4 What is the correct sequence of form events?
Initialize, Load, Paint, Resize, Activate
Initialize, Activate, Resize, Load, Paint
Activate, Load, Initialize, Resize, Paint
Initialize, Load, Resize, Activate, Paint

5 You are building an application that incorporates an Excel Spreadsheet. You want to include Excel's menu alongside your form's menu. How would you setup your application to accomplish this?
Set the form's NegotiateMenus property to true
Set each menu's NegotiatePosition property to any non-zero number
Set the form's NegotiatePosition property to true
Set the OLE control's NegotiateMenus property to true

6 Which database tools are available in all versions of Visual Basic?
Remote Data Objects
Data-bound ListBox and ComboBox
Data Access Objects
Data Control

7 You have a form with a Data Control. What actions will cause changes to a record to be written to the database?
A different record is accessed
The UpdateControls method is used
The form is unloaded
The UpdateRecord method is used

8 What is necessary for early binding?
ActiveX component supplies type library
ActiveX component implements a DCOM interface
Creating an object reference using a variable of a specific class
Object instance is created using Set statement using "CreateObject"

9 What will cause an out-of-process ActiveX Code Component to be registered?
The component is run for the first time
Run Regsvr32.exe with the /u option
Run the component with the /RegServer command-line argument
Use the setup wizard to install the program

10 You are building an application that will use Excel. You need to find information about Excel's events. Where do you look?
Event HelpFile
Event Viewer
Object Browser
Excel Developer Kit

11 You are manually registering components. For which can you use REGSVR32.DLL?
.OCX
.DLL
.EXE
.CAB

12 In a project, you have Form1 with PictureBox1 with AutoRedraw = False, Label1, and TextBox1. The following code is executed while the form is minimized. What is displayed when the form is normalized?
Text1.text = "ABC Company" Label1.Caption = "Name" Picture1.Print "Invoice #100 $500.00"
"ABC Company" "Name" "Invoice #100 $500.00"
"ABC Company"
"Name" "Invoice #100 $500.00" "ABC Company" "Name"

13 You are asked to create an application that allows the user to look through several hierarchical layers and displays the individual sets of records for each. What controls would you use?
TreeView
Outline
ListBox
ListView

14 An application you are building requires menu selections reflecting the Most Recently Used files that must change as new documents are used. What will accomplish this?
At design-time, create a menu item mnuRecentFile with index =0 and visible = False
At design-time, enable the MRU property of the mnuRecentFile menu item
At run-time, use MenuLoad to add the menu item
At run-time, use MenuAdd to add the menu item

15 What will implement an out-of-process class that can service multiple objects at the same time?
Set Class1 Instancing property to "SingleUse"
Set Class1 Instancing property to "MultiUse"
Set Class1 Instancing property to "Private"
Dim oClass1 as New Class1
Dim oClass2 as New Class1

16 For the application you are developing, you expect database activity to result in few conflicts when making changes. What setting would you use?
LockEdits = True
LockEdits = False
LockOptomistic = False
LockOptomistic = True

17 What system object would you use to set the height and width of a form so that it is proportionally the same for all monitor resolutions?
App
Screen
Desktop
Windows

18 What will add an icon to a ListView control?
Set a ListItem.Icon with a number or key associated with an icon in an ImageList control
Set ListView.Icon = LoadPicture("ABC.ico")
Set ListView1.ListItem.SmallIcon = LoadPicture("ABC.ico")
ListView1.IconAdd "ABC.ico"

19 What specifies the bound field to display in a DBList control?
ListField
BoundText
DataField
DataSource

20 You have a class with functions that you want to use system wide when developing other applications. What will accomplish this?
Add the class module to the other applications
Set the class module's instancing property to GlobalMultiUse
Set the class module's instancing property to SystemObject
Declare an object as: Dim System oClass1 as Class1

21 What is True when a recordset has no records?
BOF = False
EOF = True
RecordCount = 0
CurrentRecord = 0

22 What is NOT a valid property of a menu control?
Disabled
Checked
WindowList
Invisible

23 What would you use to create a list of open child forms under the Windows menu?
WindowList = True
Check the WindowList property in the menu editor for the Windows menu control
mnuWindows.AddItem form1.caption
Check the ChildWindowList property in the project dialog

24 You are developing an application that requires asynchronous processing between the client and ActiveX server component. What requirements would prompt you to use an Event mechanism in the component for notification?
The notification can be broadcast anonymously
The order in which clients receive the notification is not important
The server must get control back after all clients have received the notification
Optional arguments are required

25 When you use VBA's built-in procedures to save application settings in Windows 95, where are these written?
HKEY_CURRENT_USER\Software\VB and VBA Program Settings
Win.ini
As specified in the file parameter
HKEY_LOCAL_MACHINE\Software\VB and VBA Program Settings