|
Braindumps of 70-526
TS: Microsoft .NET Framework 2.0 -
Windows-Based Client Development
Exam Questions, Answers,
Braindumps (70-526)
Submitting
some questions, specially for you. These will help u a
lot.
Question: 1
You are creating a Windows Form that
contains several ToolStrip controls.
You need to add functionality that allows
a user to drag any ToolStrip control from one edge of
the form to another.
What should you do?
A. Configure a ToolStripContainer control
to fill the form.
Add the ToolStrip controls to the
ToolStripContainer control.
B. Configure a Panel control to fill the
form.
Set the Anchor properties of the
ToolStrip controls to Top, Bottom, Left, Right.
C. Add a ToolStrip controls to another
ToolStrip control that is hosted by a
ToolStripControlHost
control.
D. Add the ToolStrip controls to the
form.
Set the Anchor properties of the
ToolStrip controls to Top, Bottom, Left, Right.
Set the FormBorderStyle property of the
form to SizableToolWindow.
Answer: A
Question: 2
You need to create a Windows Forms
application that uses a nonrectangular form as its user
interface.
What should you do?
A. Set the FormBorderStyle property of
the form to None.
Set the BackgroundImage property of the
form to a bitmap file that represents the shape you
want form to take.
Set the TransparencyKey property to the
background color of the bitmap file.
B. Set the FormBorderStyle property of
the form to None.
Set the BackgroundImage property of the
form to a bitmap file that represents the shape you
want the form to take.
Set the TransparencyKey property to
Transparent.
C. Set the FormBorderStyle and
BackgroundImageLayout properties to None.
Set the BackgroundImage property of the
form to a bitmap file that represents the shape you
want the form to take.
Set the TransparencyKey property to
Transparent.
D. Set the FormBorderStyle property to
None and the BackColor property to Control.
Set the BackgroundImage property of the
form to a bitmap file that represents the shape you
want the form to take.
Set the TransparencyKey property to
Transparent.
Answer: A
Question: 3
You create a Windows Forms application.
Your application executes a background thread.
You need to construct the thread to exit,
but you also need to notify the main thread when the
background thread has ended.
What should you do?
A. Call the Abort method of the thread.
B. Call the Interrupt method of the
thread.
C. Call the Join method of the thread.
D. Call the Sleep method of the thread.
Answer: C
Question: 4
You are creating a Windows Forms
application that uses a drag-and-drop operation to
enable
users to copy customer data between a
ListBox control and RichTextBox control. The ListBox
displays a list of customer Ids to the
user. Each item in the ListBox is associated with a
custom
external data type named CustomerData.
The data type stores the customer name along with
other customer information, including the
address and postal code.
You need to ensure that when the user
drags a customer name from the ListBox to the
RichTextBox all of the information in
your custom data type is moved into the RichTextBox.
What should you do?
A. Initiate the drag-and-drop operation
in the MouseDown event for the ListBox.
Call the DoDragDrop method for the
ListBox, passing in an instance of CustomerData.
Use the GetFormats method in the
DragEnter event for the RichTextBox to access the
custom data type.
B. Initiate the drag-and-drop operation
in the MouseDown event for the ListBox.
Call the DoDragDrop method for the
ListBox, passing in an instance of CustomerData.
Use the GetData method in the DragDrop
event for the RichTextBox to access the custom
data type.
C. Initiate the drag-and-drop operation
in the MouseDown event for the ListBox.
In the DragEnter or DragDrop events for
the RichTextBox, set the Effect property to
DragDropEffects.All.
Use the GetFormats method in the
DragEnter event for the RichTextBox to access the
custom data type.
D. Initiate the drag-and-drop operation
in the MouseDown event for the ListBox.
In the DragEnter or DragDrop events for
the RichTextBox, set the Effect property to
DragDropEffects.All.
Use the GetDataPresent method in the
DragEnter event for the RichTextBox to access the
custom data type.
Answer: B
Question: 5
You are creating multiple-document
interface (MDI) Windows Forms application.
You need to configure the main form to
function as the parent form and a second form to
function
as the child form.
What should you do?
A. Set the IsMdiContainer property of the
parent form to True.
Set the MdiParent property of the child
form to the parent form.
B. Set the IsMdiContainer property of the
parent form to True.
Set the Parent property of the child form
to the parent form.
C. Add the child form to the Controls
collection of the parent form.
Set the MdiParent property of the child
form to the parent form.
D. Add the child form to the Controls
collection of the parent form.
Set the Parent property of the child form
to the parent form.
Answer: A
Question: 6
You are adding accssibility functionality
to a custom, owner-drawn control named Legend. You
create a class named AccessibleLegend,
which is derived from the AccessibleObject class.
The Legend control overrides the GetChild
method and returns an AccessibleLegend object.
You need to ensure that when the Legend
control is disabled, the control still returns the
appropriate value for the State property
of the AccessibleLegend object.
Which value should you configure the
State property to return?
A. AccessibleStates.Invisible
B. AccessibleStates.Protected
C. AccessibleStates.ReadOnly
D. AccessibleStates.Unavailable
Answer: D
Question: 7
You are creating a Windows Forms
application. Your application uses a custom control. The
Custom control is based on a standard
button control. You add several extra properties to the
control. Some of these properties are
read-only.
You need to ensure that the read-only
properties are not displayed in the Properties window of
the design environment.
What should you do?
A. Decorate the read-only properties by
using the EditorBrowsable attribute, and then set the
EditorBrowsable attribute to
EditorBrowsableState.Never.
B. Use the DesignTimeVisible attribute,
and then set the DesignTimeVisible attribute to False.
C. Decorate the read-only properties by
using the Borwsable attribute, and then set the
Browsable attribute to False.
D. Decorate the read-only properties by
using the DisplayName attribute, and then set the
DisplayName attribute to null.
Answer: C
Question: 8
You create a custom control by extending
a standard TextBox control. The custom control adds a
new property called ValidationColor.
You need to ensure that uses can select
the color for the ValidationColor property from the
Properties window at design time by using
the color action palette that is available for other
standard Windows Forms controls.
What should you do?
A. Create a custom context menu that
contains the chosen color palette and logic.
Implement the IcontainerControl interface
for your control.
B. Create a custom dialog box that
contains the chosen color palette and logic.
Configure the FormBorder property of the
dialog box to None.
Implement the IcontainerControl interface
for your control, and use its ActivateControl method
to activate the dialog box.
C. Create a custom dialog box that
contains the chosen color palette and logic.
Configure the FormBorder property of the
dialog box to None.
In the Set method of your property, write
code to instantiate the dialog box and return the
selected value.
D. Declare the type of the property as
System.Drawing.Color.
Answer: D
|