You are customizing a Windows Form. You want to display a custom icon for your composite control named
DialerControl in the toolbox. You need to customize the toolbox icon. You want to achieve this goal by using the
minimum amound of effort.
Which action or actions should you perform?
(Choose all that apply.)
You are creating a shaped Windows Form. The shape and background for the form are available in a bitmap file named Background.bmp. The FormBorderStyle property is set to None and the BackgroundImage property
is set to background.bmp. However, when the application runs, the entire image including all of the background is visible and the form still appears to be rectangular. You need to configure the form so that it takes the shape
of the bitmap file without the background. What should you do?
You are creating a Windows Form. You add a TableLayoutPanel control named pnlLayout to the form. You set the properties of pnlLayout so that it will resize with the form. You need to create a three-column layout that has
fixed left and right columns. The fixed columns must each remain 50 pixels wide when the form is resized. The middle column must fill the remainder of the form width when the form is resized. You add the three columns in
the designer. Which code segment should you use to format the columns at run time?
You have received instructions to make sure that the PictureBox control's properties cannot be changed with a logo that you have added to the PictureBox in the designer of the form base. Before the time you have added a
form to the Microsoft Windows Forms Control Library project and add a PictureBox control to the form.
The form is presenting Certkiller.com's logo.
What action should you take?
You are customizing a Windows Form. When the user clicks any button, you want the application to log information about the user's actions by calling a method with the following signature.
public void ctl_Click(object sender, EventArgs e)
You want the form to invoke this method when any Button control is clicked and only when a Button control is clicked. You need to modify the form to invoke this method without interfering with the existing operations of the
application. What should you do?
You are customizing a Windows Form. The form includes a menu that has several ToolStripMenuItem controls.
An event handler is configured to handle the Click event for all ToolStripMenuItem controls. The event handler has the following signature. private void menu_Click(object sender, EventArgs e) The form class includes a
method that has the following signature.
private void LogClick(string ctlName)
You need to add code so that when a user clicks a ToolStripMenuItem control, the menu_Click method calls the LogClick method. The LogClick method must be called with the ctlName parameter set to the menu text in
the ToolStripMenuItem control.
Which code segment should you use?
You are creating a Windows Form that includes a TextBox control named txtDate. When a user right click within the text box, you want the application to display a MonthCalendar control. You need to implement a
context menu that provides this functionality. What should you do?
You create an application that provide accessibility features. Your standard forms display a background image.
When the user selects Use High Constrast in the Accessibility Options in Control Panel, you want this image to be removed. You need to add an event to handle this accessibility setting change. Which event should you use?
You are creating a custom Windows Forms control. On the background of the control, an ellipse completely filled with a colored gradient is drawn. The bounds for the ellipse are equal to the bounds for the control. The
control must correctly repaint itself in all situations. You need to include the drawing of the ellipse in the OnPaint event handler for the custom control. Which code segment should you use?
You have configured three columns to a form and add a TableLayoutPanel to the form. You want the two side columns to have a fix width of 200 pixels each and anchor the four edges of the form to the control. A Certkiller
.com manager wants the center column to fill the remaining space, when ever the form is resized. You need to change the ColumnStyle instance that represents the center column? How should you set the ColumnStyle
instance's Size Type property?