Version

IsOpen(UltraDesktopAlertWindowInfo) Method

Returns whether the specified UltraDesktopAlertWindowInfo instance is currently open.
Syntax
'Declaration
 
Public Overloads Function IsOpen( _
   ByVal windowInfo As UltraDesktopAlertWindowInfo _
) As Boolean

Parameters

windowInfo
The UltraDesktopAlertWindowInfo instance, returned from the Show(UltraDesktopAlertShowWindowInfo) method, which identifies the desktop alert window to be tested.

Return Value

A boolean indicating whether the specified UltraDesktopAlertWindowInfo is currently open.
Example
The following code sample demonstrates how the UltraDesktopAlertWindowInfo class can be used to obtain information about a desktop alert window:

Imports Infragistics.Win
Imports Infragistics.Win.Misc

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        '  Use full opacity for this demonstration.
        Me.desktopAlert.Opacity = 1.0F

        '  Create a new instance of the UltraDesktopAlertShowWindowInfo class.
        Dim showInfo As UltraDesktopAlertShowWindowInfo = New UltraDesktopAlertShowWindowInfo()

        '  Set the Caption, Text and FooterText with <a> tags so that the
        '  DesktopAlertLinkClicked event fires when they are clicked.
        showInfo.Caption = String.Format("<a>{0}</a>", "Caption")
        showInfo.Text = String.Format("<a>{0}</a>", "Text")
        showInfo.FooterText = String.Format("<a>{0}</a>", "FooterText")

        '  Set the image that is displayed in the desktop alert window's
        '  client area, and the sound that is played as the window appears.
        showInfo.Image = new Icon( "C:\Icons\DesktopAlert.ico" ).ToBitmap()
        showInfo.Sound = "C:\windows\media\notify.wav"

        '  Set the Key property, which provides a way to associate the
        '  desktop alert window with a unique key.
        showInfo.Key = "MyWindow"

        '  Call the Show method to display the desktop alert note that the
        '  return value from the method is an instance of the
        '  UltraDesktopAlertWindowInfo class, which is basically a copy
        '  of the UltraDesktopAlertShowWindowInfo instance that was used
        '  to show the desktop alert window.
        Dim windowInfo As UltraDesktopAlertWindowInfo = Me.desktopAlert.Show(showInfo)

        Dim sb As System.Text.StringBuilder = New System.Text.StringBuilder()
        sb.Append(String.Format("Caption = {0}", windowInfo.Caption))
        sb.Append(Environment.NewLine)
        sb.Append(String.Format("Text = {0}", windowInfo.Text))
        sb.Append(Environment.NewLine)
        sb.Append(String.Format("FooterText = {0}", windowInfo.FooterText))
        sb.Append(Environment.NewLine)
        sb.Append(String.Format("Key = {0}", windowInfo.Key))
        sb.Append(Environment.NewLine)
        sb.Append(String.Format("PinButtonVisible = {0}", windowInfo.PinButtonVisible))
        sb.Append(Environment.NewLine)
        sb.Append(String.Format("Sound = {0}", showInfo.Sound))
        sb.Append(Environment.NewLine)

        MessageBox.Show(sb.ToString(), "UltraDesktopAlert", MessageBoxButtons.OK, MessageBoxIcon.None)
    End Sub
using Infragistics.Win;
using Infragistics.Win.Misc;
using System.Diagnostics;


    private void Button1_Click(object sender, EventArgs e)
    {
        //  Use full opacity for this demonstration.
        this.desktopAlert.Opacity = 1f;

        //  Create a new instance of the UltraDesktopAlertShowWindowInfo class.
        UltraDesktopAlertShowWindowInfo showInfo = new UltraDesktopAlertShowWindowInfo();

        //  Set the Caption, Text and FooterText with <a> tags so that the
        //  DesktopAlertLinkClicked event fires when they are clicked.
        showInfo.Caption = string.Format("<a>{0}</a>", "Caption");
        showInfo.Text = string.Format("<a>{0}</a>", "Text");
        showInfo.FooterText = string.Format("<a>{0}</a>", "FooterText");

        //  Set the image that is displayed in the desktop alert window's
        //  client area, and the sound that is played as the window appears.
        showInfo.Image = new Icon( @"C:\Icons\DesktopAlert.ico" ).ToBitmap();
        showInfo.Sound = @"C:\windows\media\notify.wav";
        
        //  Set the Key property, which provides a way to associate the
        //  desktop alert window with a unique key.
        showInfo.Key = "MyWindow";

        //  Call the Show method to display the desktop alert; note that the
        //  return value from the method is an instance of the
        //  UltraDesktopAlertWindowInfo class, which is basically a copy
        //  of the UltraDesktopAlertShowWindowInfo instance that was used
        //  to show the desktop alert window.
        UltraDesktopAlertWindowInfo windowInfo = this.desktopAlert.Show(showInfo);

        string caption = windowInfo.Caption;
        string text = windowInfo.Text;
        string footerText = windowInfo.FooterText;
        string key = windowInfo.Key;
        bool pinButtonVisible = windowInfo.PinButtonVisible;
        string sound = showInfo.Sound as string;

        StringBuilder sb = new StringBuilder();
        sb.Append( string.Format("Caption = {0}", caption ) );
        sb.Append( Environment.NewLine );
        sb.Append( string.Format("Text = {0}", text ) );
        sb.Append( Environment.NewLine );
        sb.Append( string.Format("FooterText = {0}", footerText ) );
        sb.Append( Environment.NewLine );
        sb.Append( string.Format("Key = {0}", key ) );
        sb.Append( Environment.NewLine );
        sb.Append( string.Format("PinButtonVisible = {0}", pinButtonVisible ) );
        sb.Append( Environment.NewLine );
        sb.Append( string.Format("Sound = {0}", sound ) );
        sb.Append( Environment.NewLine );
        sb.Append( string.Format("IsOpen? {0}", this.desktopAlert.IsOpen(windowInfo) ) );
        sb.Append( Environment.NewLine );
        sb.Append(String.Format("IsOpen? {0}", Me.desktopAlert.IsOpen(windowInfo)))
        sb.Append(Environment.NewLine)

        MessageBox.Show( sb.ToString(), "UltraDesktopAlert", MessageBoxButtons.OK, MessageBoxIcon.None );
    }
Requirements

Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Server 2012, Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also