Click here to Skip to main content
15,886,052 members
Articles / Programming Languages / C#

Creating a Timer Using the Amazing New Windows 7 Features

Rate me:
Please Sign up or sign in to vote.
4.89/5 (99 votes)
4 Jan 2010CPOL7 min read 153.1K   6K   166  
This article shows how to create a simple egg timer that uses features new to Windows 7.
// Copyright (c) Microsoft Corporation.  All rights reserved.


namespace Microsoft.WindowsAPICodePack.Shell
{
    /// <summary>
    /// Defines the read-only properties for default shell icon sizes.
    /// </summary>
    public static class DefaultIconSize
    {
        /// <summary>
        /// The small size property for a 16x16 pixel Shell Icon.
        /// </summary>
        public static readonly System.Windows.Size Small = new System.Windows.Size(16, 16);

        /// <summary>
        /// The medium size property for a 32x32 pixel Shell Icon.
        /// </summary>
        public static readonly System.Windows.Size Medium = new System.Windows.Size(32, 32);

        /// <summary>
        /// The large size property for a 48x48 pixel Shell Icon.
        /// </summary>
        public static readonly System.Windows.Size Large = new System.Windows.Size(48, 48);

        /// <summary>
        /// The extra-large size property for a 256x256 pixel Shell Icon.
        /// </summary>
        public static readonly System.Windows.Size ExtraLarge = new System.Windows.Size(256, 256);

        /// <summary>
        /// The maximum size for a Shell Icon, 256x256 pixels.
        /// </summary>
        public static readonly System.Windows.Size Maximum = new System.Windows.Size(256, 256);

    }

    /// <summary>
    /// Defines the read-only properties for default shell thumbnail sizes.
    /// </summary>
    public static class DefaultThumbnailSize
    {
        /// <summary>
        /// Gets the small size property for a 32x32 pixel Shell Thumbnail.
        /// </summary>
        public static readonly System.Windows.Size Small = new System.Windows.Size(32, 32);

        /// <summary>
        /// Gets the medium size property for a 96x96 pixel Shell Thumbnail.
        /// </summary>
        public static readonly System.Windows.Size Medium = new System.Windows.Size(96, 96);

        /// <summary>
        /// Gets the large size property for a 256x256 pixel Shell Thumbnail.
        /// </summary>
        public static readonly System.Windows.Size Large = new System.Windows.Size(256, 256);

        /// <summary>
        /// Gets the extra-large size property for a 1024x1024 pixel Shell Thumbnail.
        /// </summary>
        public static readonly System.Windows.Size ExtraLarge = new System.Windows.Size(1024, 1024);

        /// <summary>
        /// Maximum size for the Shell Thumbnail, 1024x1024 pixels.
        /// </summary>
        public static readonly System.Windows.Size Maximum = new System.Windows.Size(1024, 1024);
    }
}

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Software Developer (Senior)
Netherlands Netherlands
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions