You create a Windows Forms application by using the .NET Framework 3.5.
The application has a data entry form that includes the following controls:
A Label control docked to the bottom of the form to provide status details
A TextBox control docked to the top of the form to provide search functionality
You plan to design 10 additional Windows forms that have the same search functionality and status label.
The background color and the font size of the Label control for different forms will be different.
You need to ensure that the functionality is shared between forms by using minimum development effort.
What should you do?
A.
Create a base form that has the Label and TextBox controls.
Set the Modifiers property of the Label control to private. Set the Modifiers property of the TextBox control
to protected. Inherit all the forms from the base form.
B.
Create a base form that has the Label and TextBox controls.
Set the Modifiers property of the Label control to protected. Set the Modifiers property of the TextBox
control to private. Inherit all the forms from the base form.
C.
Create a composite UserControl control that contains the Label and TextBox controls.
Set the Modifiers property of the Label control to private. Set the Modifiers property of the TextBox control
to protected.
Add the UserControl control to all the forms.
D.
Create a composite UserControl control that contains the Label and TextBox controls.
Set the Modifiers property of the Label control to protected. Set the Modifiers property of the TextBox
control to private.
Add the UserControl control to all the forms.