Form.Icon 属性

定义

获取或设置窗体的图标。Gets or sets the icon for the form.

public:
 property System::Drawing::Icon ^ Icon { System::Drawing::Icon ^ get(); void set(System::Drawing::Icon ^ value); };
public System.Drawing.Icon Icon { get; set; }
member this.Icon : System.Drawing.Icon with get, set
Public Property Icon As Icon

属性值

Icon,表示窗体的图标。An Icon that represents the icon for the form.

注解

窗体的图标指定在任务栏中显示窗体的图片以及为窗体的控件框显示的图标。A form's icon designates the picture that represents the form in the taskbar as well as the icon that is displayed for the control box of the form.

如果 FormBorderStyle 设置为 FixedDialog,则此属性将不起作用。This property will have no effect if FormBorderStyle is set to FixedDialog. 在这种情况下,窗体将不会显示图标。In that case, the form will not display an icon.

适用于

另请参阅