To change the control’s Shape using the . . . . . . . . property

image
combo
shape
text

The correct answer is C. shape.

The shape property is used to change the control’s shape. It can be set to any of the following values:

  • Rectangle
  • RoundedRectangle
  • Ellipse
  • Line
  • Image
  • Text

The image property is used to set the control’s image. It can be set to any image file that is supported by the control.

The combo property is used to set the control’s combo box. It can be set to any combo box that is supported by the control.

The text property is used to set the control’s text. It can be set to any text string.

For example, the following code changes the shape of a button to a rounded rectangle:

button1.shape = System.Windows.Forms.ControlStyles.RoundedRectangle;

The following code changes the image of a button to an image file named “image.jpg”:

button1.image = Image.FromFile("image.jpg");

The following code changes the combo box of a button to a combo box named “comboBox1”:

button1.combo = comboBox1;

The following code changes the text of a button to the text string “Click Me”:

button1.text = "Click Me";

Exit mobile version