using System; using System.Collections.Generic; using System.Linq; using System.Text; using Microsoft.WindowsAPICodePack.Taskbar; using TaskManager.Common; using System.Drawing; namespace TaskManager.Window7 { /// <summary> /// Class to handle Window 7 task bar operations /// </summary> public class TaskBar { #region Public Methods /// <summary> /// Method to set task bar progress value /// </summary> /// <param name="value">value</param> public static void SetProgressValue(int value) { TaskbarProgressBarState state = TaskbarProgressBarState.Normal; TaskbarManager.Instance.SetProgressState(state); TaskbarManager.Instance.SetProgressValue(value, 100); } /// <summary> /// method to clear task bar progress value /// </summary> public static void ClearProgressValue() { TaskbarManager.Instance.SetProgressState(TaskbarProgressBarState.NoProgress); } /// <summary> /// method to set task bar icon /// </summary> /// <param name="icon">icon</param> public static void SetTaskBarIcon(Icon icon) { TaskbarManager.Instance.SetOverlayIcon(icon, "icon"); } /// <summary> /// method to clear task bar icon /// </summary> public static void ClearTaskBarIcon() { TaskbarManager.Instance.SetOverlayIcon(null, string.Empty); } #endregion } }
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.
This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)