NanoByte.Common  2.6.1
NanoByte.Common.Native.WindowsTaskbar Class Reference

Provides helper methods and API calls specific to the Windows 7 or newer taskbar. More...

Classes

struct  ShellLink
 Represents a shell link targeting a file. More...
 

Public Types

enum class  ProgressBarState {
  NoProgress = 0 , Indeterminate = 0x1 , Normal = 0x2 , Error = 0x4 ,
  Paused = 0x8
}
 Represents the thumbnail progress bar state. More...
 

Static Public Member Functions

static void SetProgressState (IntPtr handle, ProgressBarState state)
 Sets the state of the taskbar progress indicator. More...
 
static void SetProgressValue (IntPtr handle, int currentValue, int maximumValue)
 Sets the value of the taskbar progress indicator. More...
 
static void SetWindowAppID (IntPtr hwnd, [Localizable(false)] string appID, [Localizable(false)] string? relaunchCommand=null, [Localizable(false)] string? relaunchIcon=null, [Localizable(true)] string? relaunchName=null)
 Sets a specific window's explicit application user model ID. More...
 
static void AddTaskLinks ([Localizable(false)] string appID, IEnumerable< ShellLink > links)
 Adds user-task links to the taskbar jumplist. Any existing task links are removed. More...
 
static void PreventPinning (IntPtr hwnd)
 Prevents a specific window from being pinned to the taskbar. More...
 

Detailed Description

Provides helper methods and API calls specific to the Windows 7 or newer taskbar.

Member Enumeration Documentation

◆ ProgressBarState

Represents the thumbnail progress bar state.

Enumerator
NoProgress 

No progress is displayed.

Indeterminate 

The progress is indeterminate (marquee).

Normal 

Normal progress is displayed.

Error 

An error occurred (red).

Paused 

The operation is paused (yellow).

Member Function Documentation

◆ AddTaskLinks()

static void NanoByte.Common.Native.WindowsTaskbar.AddTaskLinks ( [Localizable(false)] string  appID,
IEnumerable< ShellLink links 
)
inlinestatic

Adds user-task links to the taskbar jumplist. Any existing task links are removed.

Parameters
appIDThe application ID of the jumplist to add the task to.
linksThe links to add to the jumplist.

◆ PreventPinning()

static void NanoByte.Common.Native.WindowsTaskbar.PreventPinning ( IntPtr  hwnd)
inlinestatic

Prevents a specific window from being pinned to the taskbar.

Parameters
hwndA handle to the window to prevent from being pinned.

◆ SetProgressState()

static void NanoByte.Common.Native.WindowsTaskbar.SetProgressState ( IntPtr  handle,
ProgressBarState  state 
)
inlinestatic

Sets the state of the taskbar progress indicator.

Parameters
handleThe handle of the window whose taskbar button contains the progress indicator.
stateThe state of the progress indicator.

◆ SetProgressValue()

static void NanoByte.Common.Native.WindowsTaskbar.SetProgressValue ( IntPtr  handle,
int  currentValue,
int  maximumValue 
)
inlinestatic

Sets the value of the taskbar progress indicator.

Parameters
handleThe handle of the window whose taskbar button contains the progress indicator.
currentValueThe current value of the progress indicator.
maximumValueThe value currentValue will have when the operation is complete.

◆ SetWindowAppID()

static void NanoByte.Common.Native.WindowsTaskbar.SetWindowAppID ( IntPtr  hwnd,
[Localizable(false)] string  appID,
[Localizable(false)] string?  relaunchCommand = null,
[Localizable(false)] string?  relaunchIcon = null,
[Localizable(true)] string?  relaunchName = null 
)
inlinestatic

Sets a specific window's explicit application user model ID.

Parameters
hwndA handle to the window to set the ID for.
appIDThe application ID to set.
relaunchCommandThe command to use for relaunching this specific window if it was pinned to the taskbar; can be null.
relaunchIconThe icon to use for pinning this specific window to the taskbar (written as Path,ResourceIndex); can be null.
relaunchNameThe user-friendly name to associate with relaunchCommand ; can be null.

The application ID is used to group related windows in the taskbar.


The documentation for this class was generated from the following file: