Microsoft 70-505 Real Exam Questions

TS: Microsoft .NET Framework 3.5, Windows Forms Application Development

This exam is intended to test a candidate on their ability to create Windows Forms applications on .NET 3.5.

Questions that contain code will be presented in either VB or C#.  Candidates can select one of these languages when they start the exam.

1: You are creating a Windows Forms application by using the .NET Framework 3.5. You have resource files in five different languages. You need to test the application in each language. What should you do?
A.Set the CurrentCulture property explicitly to the respective culture for each language.
B.Set the CurrentCulture property explicitly to IsNeutralCulture for each language.
C.Set the CurrentUICulture property explicitly to IsNeutralCulture for each language.
D.Set the CurrentUICulture property explicitly to the respective culture for each language.
Correct Answers: D

2: displays employee names by using the TreeView control.  You need to implement the drag-and-drop functionality in the TreeView control. Which two actions should you perform? (Each correct answer presents part of the solution. Choose two.)
A.Set the AllowDrag property to true. Create an event handler for the DragOver event.
B.Set the AllowDrag property to true. Create an event handler for the ItemDrag event to call the DoDragDrop method.
C.Set the AllowDrag property to true. Create an event handler for the DragEnter event to call the DoDragDrop method.
D.Create an event handler for the DragDrop event to handle the move or copy by itself.
E.Create an event handler for the DragEnter event to handle the move or copy by itself.
Correct Answers: B D

3: You are creating a Windows Forms application for a financial service provider by using the .NET Framework 3.5. You have to implement a multiple-document interface (MDI) in the application to allow users to open multiple financial documents simultaneously.  You need to ensure that whenever the child MDI form is created, the application displays a message in the title bar of the parent MDI that a child form has received focus.  What should you do?
A.Implement the Activated event.
B.Implement the MdiChildActivate event.
C.Override the OnParentVisibleChanged method.
D.Override the OnParentBindingContextChanged method.
Correct Answers: B

4: You are creating a Windows Forms application by using the .NET Framework 3.5. You plan to deploy the application in multiple countries and languages. You need to ensure that the application meets the globalization requirements. Which two actions should you perform? (Each correct answer presents part of the solution. Choose two.)
A.Handle server names and URLs as ASCII data.
B.Use Unicode strings throughout the application.
C.Use the NumberFormatInfo class for numeric formatting.
D.Handle strings as a series of individual characters instead of entire strings.
E.Avoid usage of the SortKey class and the CompareInfo class for sorting purposes.
Correct Answers: B C

5: You are creating a multiple-document interface (MDI) application by using the .NET Framework 3.5.
You configure the frmParent form to be an MDI parent.
You write the following code segment. (Line numbers are included for reference only.)
01 Form frmChild = new Form();
02 Form frmParent = this;
03
You need to associate and display the frmChild form and the frmParent form.
Which code segment should you add at line 03?
A.frmChild.MdiParent = frmParent;frmChild.ShowDialog();
B.frmChild.MdiParent = frmParent;frmChild.Show();
C.frmChild.IsMdiContainer = true;frmChild.ShowDialog();
D.frmChild.IsMdiContainer = true; frmChild.Show();
Correct Answers: B

6: You are creating a Windows Forms application by using the .NET Framework 3.5.
You create a new form in the application. You add a ContextMenuStrip control named ctxMenu to the form. You have a user-defined class named CustomControl.
You write the following code segment in the application. (Line numbers are included for reference only.)
01 CustomControl myControl = new CustomControl();
02 
You need to ensure that an instance of CustomControl is displayed on the form as a top-level item of the ctxMenu control.
Which code segment should you add at line 02?
A.ToolStripControlHost host = new ToolStripControlHost(myControl);ctxMenu.Items.Add(host);
B.ToolStripPanel panel = new ToolStripPanel();panel.Controls.Add(myControl);ctxMenu.Controls.Add(panel);
C.ToolStripContentPanel panel = new ToolStripContentPanel();panel.Controls.Add(myControl);ctxMenu.Controls.Add(panel);
D.ToolStripMenuItem menuItem = new ToolStripMenuItem();ToolStripControlHost host = new ToolStripControlHost(myControl);menuItem.DropDownItems.Add(host);ctxMenu.Items.Add(menuItem);
Correct Answers: A

7: You are creating a Windows Forms application by using the .NET Framework 3.5.
You create a new form in your application. You add a SplitContainer control named spcFrame to the form. The SplitContainer control has two SplitterPanel controls named Panel1 and Panel2.
You are configuring the SplitContainer control to define the layout of the form.
You need to ensure that the following requirements are met:
    The initial distance from the left edge of the spcFrame splitter is set to 200 pixels.
    The size of the Panel2 SplitterPanel remains unchanged when the form is resized.
Which code segment should you use?
A.spcFrame.Panel1MinSize = 200;spcFrame.FixedPanel = FixedPanel.Panel1;
B.spcFrame.IsSplitterFixed = true;spcFrame.SplitterWidth = 200;
C.spcFrame.SplitterDistance = 200;spcFrame.FixedPanel = FixedPanel.Panel2;
D.spcFrame.Panel2MinSize = 0;spcFrame.SplitterIncrement = 200;
Correct Answers: C

8: You are creating a Windows Forms application by using the .NET Framework 3.5. You create a new form in your application. You add 100 controls at run time in the Load event handler of the form. Users report that the form takes a long time to get displayed. You need to improve the performance of the form. What should you do?
A.Call the InitLayout method of the form before adding all the controls.Call the PerformLayout method of the form after adding all the controls.
B.Call the InitLayout method of the form before adding all the controls.Call the ResumeLayout method of the form after adding all the controls.
C.Call the SuspendLayout method of the form before adding all the controls.Call the PerformLayout method of the form after adding all the controls.
D.Call the SuspendLayout method of the form before adding all the controls.Call the ResumeLayout method of the form after adding all the controls.
Correct Answers: D

9: You are creating a Windows Forms application by using the .NET Framework 3.5. You plan to develop a new control for the application. The control will have the same properties as a TextBox control. You need to ensure that the control has a transparent background when it is painted on a form. You want to achieve this goal by using minimum amount of development effort. What should you do?
A.Create a new class that is derived from the Control class.Call the SetStyle method in the constructor.
B.Create a new class that is derived from the TextBox control class.Override the OnPaint method in the constructor.
C.Create a new class that is derived from the Control class.Set the BackColor property of the control to Transparent.Call the SetStyle method in the constructor.
D.Create a new class that is derived from the TextBox control class.Set the BackColor property of the control to Transparent in the constructor.Call the SetStyle method in the constructor.
Correct Answers: D

10: You are creating a Windows Forms application by using the .NET Framework 3.5. You plan to develop a new control for the application. You need to ensure that the control extends the TreeView control by adding a custom node tag and a highlight color. What should you do?
A.Override the OnPaint method.
B.Write a code segment in the DrawNode event handler to specify the highlight color.
C.Set the DrawMode property of the control to OwnerDrawAll, and then implement a custom DrawNode event handler.
D.Set the DrawMode property of the control to OwnerDrawText, and then implement a custom DrawNode event handler.
Correct Answers: D

Download  |  Password: certificatexam.com