Click here to Skip to main content
15,885,278 members
Articles / Programming Languages / C# 4.0

EasyProgressBar for Windows Forms Application

Rate me:
Please Sign up or sign in to vote.
4.96/5 (54 votes)
8 Jun 2011CPOL20 min read 101.6K   9.4K   104  
This article discusses how to create a simple ProgressBar control for the Windows Forms Application using the .NET Framework.
using System;
using System.Windows.Forms;

namespace EasyProgressBar
{
    public interface IFloatWindowBase : IFloatWindowAlphaMembers
    {
        /// <summary>
        /// Changes the text of the specified window's title bar or its taskbar text (if it has one).
        /// </summary>
        /// <param name="controlHandle">Handle to the window or control whose text is to be changed</param>
        /// <param name="text">Pointer to a null-terminated string to be used as the new title or control text</param>
        /// <returns>If the function succeeds, the return value is true; otherwise, false</returns>
        bool SetFloatWindowTaskbarText(IntPtr controlHandle, String text);

        /// <summary>
        /// Gets or sets, the currently dock layout of the EasyProgressBar control.
        /// </summary>
        bool DockUndockProgressBar { get; set; }

        /// <summary>
        /// Gets, the parent container of the EasyProgressBar control.
        /// </summary>
        Control DockParentContainer { get; }
    }

    public interface IFloatWindowAlphaMembers
    {
        /// <summary>
        /// Gets, the handle of the float window, whose window has a alpha support or to be.
        /// </summary>
        IntPtr FloatWindowHandle { get; }

        /// <summary>
        /// Gets, the float window control is marked to layered flag or not.
        /// </summary>
        bool IsLayered { get; }

        /// <summary>
        /// Gets or sets, the target opacity value of the float window.
        /// </summary>
        byte TargetTransparency { get; set; }

        /// <summary>
        /// Gets or sets, the currently opacity value of the float window.
        /// </summary>
        byte CurrentTransparency { get; set; }
    }
}

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) ARELTEK
Turkey Turkey
Since 1998...

MCPD - Enterprise Application Developer

“Hesaplı hareket ettiğini zanneden ve onunla iftihar eyliyen dar kafalar; kurtulmağa, yükselmeğe elverişli hiç bir eser vücüda getirmezler. Kurtuluş ve yükselişi, ancak varlığına dayanan ve mülkü milletin gizli kapalı hazinelerini verimli hale getirmesini bilen, şahsi menfaatini millet menfaati uğruna feda eden, ruhu idealist, dimağı realist şahsiyetlerde aramalıdır.”

Nuri Demirağ, 1947

Comments and Discussions