ComponentOne Windows 7 Control Pack for WinForms
Working with Windows 7 Control Pack for WinForms / Working with C1TaskbarButton / C1TaskbarButton Operating System Compatibility
In This Topic
    C1TaskbarButton Operating System Compatibility
    In This Topic

    C1TaskbarButton is only supported by Windows 7. The control will not display on older versions of Windows, but it will not throw an exception if the user is using an earlier version of Windows. If the C1TaskDialog control is included in an application that may be run on previous versions of Windows – Windows XP or Vista, for example – you may want to specify an alternative dialog box so that important messages are displayed. You can do so by using the IsPlatformSupported property to detect the user's operating system.

    For example:

    To write code in Visual Basic

    Visual Basic
    Copy Code
    If C1TaskbarButton.IsPlatformSupported Then
       
    Else
        ' Show a brief message with simple choice of the action
        Dim res As DialogResult = MessageBox.Show("Text", "Caption", MessageBoxButtons.YesNoCancel)
        If res = DialogResult.Yes Then
            ....
        End If
    End If
    

    To write code in C#

    C#
    Copy Code
    if (C1TaskbarButton.IsPlatformSupported)
    
    else
    {
        // Show a brief message with simple choice of the action
        DialogResult res = MessageBox.Show("Text", "Caption", MessageBoxButtons.YesNoCancel);
        if (res == DialogResult.Yes)
        {
            ...
        }
    }