Lesson Review

You can use the following questions to test your knowledge of the information in this lesson. The questions are also available on the companion CD if you prefer to review them in electronic form.

NOTE Answers

Answers to these questions and explanations of why each answer choice is correct or incorrect are located in the "Answers" section at the end of the book.

1. Which of the following code samples correctly demonstrates how to set a flow break on a control named aButton in a FlowLayoutPanel named FLPanel1?








FLPanell.aButton .SetF1owBreak();

2. You are designing an application that includes a property page that enables the user to set properties of the application. These properties are divided into three categories: Appearance, Execution, and Memory Management. Which container control represents the best starting point for the user interface?

A. TableLayoutPanel

B. FlowLayoutPanel

C. GroupBox

D. TabControl

3. Which of the following is the correct way to add a control to a form at design time? (Choose all that apply.)

A. Select a control in the Toolbox and double-click the form.

B. Select a control in the Toolbox and draw the form with the mouse.

C. Double-click the control in the Toolbox.

D. Select the control in the Toolbox and drag it to the form.

4. Which of the following code samples demonstrates the correct way to add a Button control to a form named Form 1 at run time?



Dim aButton As New Button Form1.Controls.Add(aButton)

Button aButton = new Button(); Form1.Controls.Add(aButton);

Dim aButton As New Button Form1.Add(aButton)

Button aButton = new Button(); Form1.Add(aButton);

Form1.Add(New Button)

5. Which code sample correctly demonstrates how to add a new panel to a Split-Container named SpC1?

SpC1.Controls.Add(New Panel)

SpC1.Controls.Add(new Panel());

SpC1.Controls.Add(New SplitterPanel) // C#

SpC1.Controls.Add(new SplitterPanel());

SpC1.Add(New SplitterPanel)

SpC1.Add(new SplitterPanelO);

None of the above

None of the above

Was this article helpful?

0 0

Post a comment