Form.ShowIcon Form.ShowIcon Form.ShowIcon Form.ShowIcon Property

定义

获取或设置一个值,该值指示是否在窗体的标题栏中显示图标。Gets or sets a value indicating whether an icon is displayed in the caption bar of the form.

public:
 property bool ShowIcon { bool get(); void set(bool value); };
public bool ShowIcon { get; set; }
member this.ShowIcon : bool with get, set
Public Property ShowIcon As Boolean

属性值

如果窗体在标题栏中显示图标,则为 true;否则为 falsetrue if the form displays an icon in the caption bar; otherwise, false. 默认值为 trueThe default is true.

注解

@No__t-0 属性包含一个 @no__t 值,该值指示是否在窗体的标题栏中显示窗体的 @no__t。The ShowIcon property contains a Boolean value that indicates whether the form's Icon is displayed in the caption bar of the form. 如果 ControlBox 属性 @no__t 为-1,则图标和控件框都将被取消。If the ControlBox property is false, both the icon and control box will be suppressed.

如果在显示主窗体时 ShowIcon @no__t 为-1,则应用程序的任务栏按钮中将显示通用图标。If ShowIcon is false when the primary form is shown, a generic icon will be displayed in the taskbar button for the application.

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

适用于

另请参阅