Notification.Icon Property

[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]

Gets or sets the current icon for the message balloon on the title bar.

Namespace:  Microsoft.WindowsCE.Forms
Assembly:  Microsoft.WindowsCE.Forms (in Microsoft.WindowsCE.Forms.dll)

Syntax

'Declaration
Public Property Icon As Icon
    Get
    Set
'Usage
Dim instance As Notification
Dim value As Icon

value = instance.Icon

instance.Icon = value
public Icon Icon { get; set; }
public:
property Icon^ Icon {
    Icon^ get ();
    void set (Icon^ value);
}
member Icon : Icon with get, set

Property Value

Type: System.Drawing.Icon
An Icon. There is no default value.

Remarks

You can provide an icon file in your project either as content or as an embedded resource. To do this in Visual Studio, in the Solution Explorer, set the Build Action property of the icon file to either Content or Embedded Resource.

The recommended value for both the height and width of the icon is 16 pixels.

Examples

The following code example creates a notification and initializes a new instance of the Icon class using a data stream from an assembly resource. This code example is part of a larger example provided for the Notification class.

 'Provide an icon for the notification to appear in the title bar when dismissed.
 'Assumes an icon file is compiled with the assembly as an embedded resource.
 Dim asm As [Assembly] = [Assembly].GetExecutingAssembly()
Notification1.Icon = New Icon(asm.GetManifestResourceStream("notify.ico"), 16, 16)
 // Provide an icon for the notification to appear in the title bar when dismissed.
 // Assumes an icon file is compiled with the assembly as an embedded resource.
Assembly asm = Assembly.GetExecutingAssembly();
notification1.Icon = new Icon(asm.GetManifestResourceStream("notify.ico"),16,16);

.NET Framework Security

Platforms

Windows Mobile for Pocket PC

The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Version Information

.NET Compact Framework

Supported in: 3.5, 2.0

See Also

Reference

Notification Class

Notification Members

Microsoft.WindowsCE.Forms Namespace