Professional Documents
Culture Documents
F12
F8
F4
F1
2 .Consider the following statements and choose the appropriate option.<br>
Statement A: The UserControl class can be used to combine the functionality of different
controls into one reusable unit.<br> Statement B: The UserControl class presents
multiple interfaces, which contain members inherited from the control classes.
CheckOnClick
Checked
CheckedState
DisplayStyle
5 Consider the following statements and choose the appropriate option.
1. Drag the ToolTip control on to the form and specify its name as ToolTip1.
2. Set the ToolTipText property of the ToolTip control to Adds invoice details to the
database.
1. Drag the ToolTip control on to the form and specify its name as ToolTip1.
2. Set the 'ToolTip on ToolTip1' property of the Add button to Adds invoice details to the
database.
1. Drag the ToolTip control on to the form and specify its name as ToolTip1.
2. Set the SetToolTip property of the Add button to Adds invoice details to the
database.
1. Drag the ToolTip control to the form and specify its name as ToolTip1.
2. Set the ToolTipText property of the Add button to Adds invoice details to the
database.
7 You need to create an application that allows the user to load an image file to the
PictureBox control pictureBox1, which is available on the form. You have created a Button
control named button1, which opens the OpenFileDialog called openFileDialog1. This
OpenFileDialog allows the user to select the image file to be opened. The code in the click
event of button1 is given below:
openFileDialog1.InitialDirectory = "c:\\";
openFileDialog1.Filter = "JPG Image Files(*.JPG)|*.JPG|BMP Image Files(*.BMP)|*.BMP|GIF
Image Files(*.GIF)|*.GIF";
openFileDialog1.FilterIndex = 1;
openFileDialog1.RestoreDirectory = true;
if(openFileDialog1.ShowDialog() == DialogResult.OK)
{
pictureBox1.Image =openFileDialog1.FileName;
}
However, an error is generated on executing this code. Analyze the error and suggest a
possible solution.
However, on executing the code, the user is not able to see the child form. What could be
the possible cause of error?