Practice Questions

Question 1

Which of the following are container controls? [Select all correct answers.]

  • A. Windows form

  • B. Label

  • C. Panel

  • D. RadioButton

  • E. GroupBox

A1:

Answers A, C, and E are correct. The Windows form is itself both a container and a control, as are the Panel and GroupBox controls. Answer B is incorrect because the Label control is a read-only control used to display text, and answer d is incorrect because a RadioButton control is a check boxlike control used to allow a user to select only one of several items.

Question 2

You want to prevent a TextBox control from receiving the focus through user tabbing and to not accept changes to its stored value if a user clicks it. What action or actions should you take in order to complete this task using the least amount of effort? [Select all correct answers.]

  • A. Change the TextBox control's z-order using Send to Back.

  • B. Set the TextBox control's Enabled value to False.

  • C. Set the TextBox control's TabIndex value to 1.

  • D. Set the TextBox control's TabStop value to False.

  • E. Set the TextBox control's Visible value to False.

A2:

Answer B is correct. By setting the control's Enabled value to False, it will be grayed out, will not receive the focus, and cannot be changed by the user. This single action is the simplest solution to the requirement. Answer A is incorrect because the z-order will not affect the control's ability to be selected through tabbing or direct clicking. Answer C is incorrect because setting TabIndex to any value will simply affect the order in which the control receives the focus. Answers D and E are potentially correct, because setting TabStop to False will prevent the control from receiving focus through tabbing, and if the Visible value is set to False, the control will not be directly accessible to the user. However, this solution is not the simplest and is therefore incorrect.

Question 3

You wish to have a control that will display text and be clickable to open a Web page. You would like to avoid writing code for this purpose. Which control should you use?

  • A. Label

  • B. TextBox

  • C. LinkLabel

  • D. Button

A3:

Answer C is correct. The LinkLabel control will display text that may then be clicked to direct an action such as opening a Web page or folder or activating an application. Answers A, B, and D are incorrect because none of these controls include automatic linking behavior. You could write code to trap mouse clicks and then manually open the Web page, but it's much easier to just use the LinkData value of the LinkLabel control to specify a target URL.

Question 4

You wish to use a container control that allows scrolling around a large area. Which one of the following controls is best suited to this?

  • A. StatusBar

  • B. Label

  • C. Panel

  • D. RadioButton

  • E. GroupBox

A4:

Answer C is correct. The Panel control is a container control used for grouping other controls. The Panel control includes scroll bars to allow navigation over a large control area. Answers A, B, and D are incorrect because they are not container controls, and answer E is incorrect because the GroupBox control has a caption but is not scrollable to navigate a larger control area.

Question 5

Which of the following image types are supported by the PictureBox control? [Select all correct answers.]

  • A. ICO

  • B. BMP

  • C. WMF

  • D. JPEG

  • E. PNG

  • F. GIF

A5:

Answers A, B, C, D, E, and F are all correct. The PictureBox control may be used to display graphic images of the icon (ICO), bitmap (BMP), metafile (WMF), JPEG, PNG, and GIF image formats.

Question 6

You wish to create a form that will display the objects located within a folder. When the user clicks a button, you want to retrieve the names , sizes, and dates of all the objects and add this information to a control. Which one of the following controls is best suited to this type of display?

  • A. GroupBox

  • B. ListBox

  • C. ComboBox

  • D. TreeView

  • E. ListView

A6:

Answer E is correct. The ListView control is best suited to the display of a list of objects, such as the contents of a folder. Answer A is incorrect because the GroupBox control is better suited as a container object holding other controls. Answers B and C are incorrect because ListBox and ComboBox controls are more suited to displaying a list of values than to displaying a folder's contents. Answer D is incorrect because the hierarchical capability of the TreeView control is unnecessary here.

Question 7

You wish to configure ToolTips for each of the controls on your form. The form contains four ComboBox controls and three TextBox controls arranged within a form containing a TabControl. How many ToolTip components will your form require?

  • A. Zero

  • B. One

  • C. Two

  • D. Three

A7:

Answer B is correct. Although the TabControl has its own ToolTipText property, you must add a ToolTip component to the container in order to support ToolTips for the ComboBox and TextBox controls. A single ToolTip component is sufficient to supply ToolTips to any number of controls. Therefore, answers A, C, and D are all incorrect.

Question 8

You have decided to utilize a dialog box in order to allow a user to view her print settings. Which one of the following types of dialog boxes is best suited to this?

  • A. Color dialog box ( ColorDialog )

  • B. Page Setup dialog box ( PageSetupDialog )

  • C. Print dialog box ( PrintDialog )

  • D. Print Preview dialog box ( PrintPreviewDialog )

  • E. Print Settings dialog box ( PrintSettingsDialog )

A8:

Answer C is correct. The Print dialog box is used to select various print options and send a document to a printer. Answer A is incorrect because the Color dialog box is used to select and return a particular color value. Answer B is incorrect because the Page Setup dialog box is used to select page layout settings. Answer D is incorrect because the specification is for viewing of the print settings rather than of a print preview of the document. Answer E is incorrect because there is no standard dialog box called the Print Settings dialog box.

Question 9

Which one of the following overlapping controls would be shown on top of the others?

  • A. Control1, z-order 25

  • B. Control2, z-order 5

  • C. Control3, z-order 15

  • D. Control4, z-order 50

  • E. Control5, z-order 99

A9:

Answer B is correct. The lowest z-order value specifies the control that will be on top when multiple controls overlap. Answers A, C, D, and E are incorrect because they all specify z-axis values that are higher and therefore will be layered below Control2.

Question 10

Which one of the following control types can support a tri-state value?

  • A. Button

  • B. RadioButton

  • C. CheckBox

  • D. ListBox

  • E. CheckedListBox

  • F. ComboBox

A10:

Answer C is correct. Only the CheckBox control is intended to include a three-state value (checked, unchecked, or indeterminate). Answer A is incorrect because the Button control is used to enact an action when selected. Answer B is incorrect because a RadioButton control is used to select only one of several values but is not limited to only three. Answers D and E are incorrect because the ListBox and CheckedListBox controls are used to select multiple values from a list. Answer F is incorrect because the ComboBox control is used to select one value from a list of options or to input a new value.



Developing and Implementing WindowsR-based Applications with Visual BasicR. NET and Visual StudioR. NET Exam CramT 2 (Exam 70-306)
Developing and Implementing WindowsR-based Applications with Visual BasicR. NET and Visual StudioR. NET Exam CramT 2 (Exam 70-306)
ISBN: N/A
EAN: N/A
Year: 2002
Pages: 188

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net