This documentation is archived and is not being maintained.

ErrorProvider.Icon Property

Gets or sets the Icon that is displayed next to a control when an error description string has been set for the control.

[Visual Basic]
Public Property Icon As Icon
[C#]
public Icon Icon {get; set;}
[C++]
public: __property Icon* get_Icon();
public: __property void set_Icon(Icon*);
[JScript]
public function get Icon() : Icon;
public function set Icon(Icon);

Property Value

An Icon that signals an error has occurred. The default icon consists of an exclamation point in a circle with a red background.

Exceptions

Exception Type Condition
ArgumentNullException The assigned value of the Icon is a null reference (Nothing in Visual Basic).

Remarks

For best results, using an icon of the size 16 by 16 pixels. If the specified icon is not 16 by 16, it is resized to 16 by 16.

Requirements

Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also

ErrorProvider Class | ErrorProvider Members | System.Windows.Forms Namespace | Icon

Show: