Weil Jimmer's BlogWeil Jimmer's Blog


Taskbar Progress 工作列 進度條 C# .NET
No Comments

發布:
更新:2017-03-14 14:08:38

如上圖所示,工作列可以有進度條。本方法需要較底層,所以必須調用外部API。

請先下載參考:WindowsAPICodePack

載點一:
https://sites.google.com/site/1456wbff/home/WindowsAPI.7z?attredirects=0&d=1
載點二:
https://mega.nz/#!0J9BSbYB!4svqcg8liM6fRGDc9Zk-D_NjNzdMF5GEHY6vzLt13rY
載點三:
http://cht.tw/h/nrkw9

下載完畢後匯入參考,並使用代碼:

public void set_status_taskbar ( int value_, int max_ ) {
    if ( Microsoft.WindowsAPICodePack.Taskbar.TaskbarManager.IsPlatformSupported ) {
        var taskbarInstance = Microsoft.WindowsAPICodePack.Taskbar.TaskbarManager.Instance;
		taskbarInstance.SetProgressState(Microsoft.WindowsAPICodePack.Taskbar.TaskbarProgressBarState.Normal);
        taskbarInstance.SetProgressValue(value_, max_);
    }
}

public void set_status_finish () {
    if ( Microsoft.WindowsAPICodePack.Taskbar.TaskbarManager.IsPlatformSupported ) {
        var taskbarInstance = Microsoft.WindowsAPICodePack.Taskbar.TaskbarManager.Instance;
        taskbarInstance.SetProgressState(Microsoft.WindowsAPICodePack.Taskbar.TaskbarProgressBarState.NoProgress);
    }
}

僅此作為筆記。


This entry was posted in C#, General, Experience, Note By Weil Jimmer.

About Weil Jimmer

avatar

Hi! Everyone! My name is Weil Jimmer. This is my personal blog. I'm a webmaster of this site. I hope the site will be popular. Now, Let's go! Enjoy gaining more knowledge.
More Details About Me : https://weils.net/profile.php

Leave a Reply

Name*:

Email*:

Website:

Privacy:   

Comment*:

Visitor Count

pop
nonenonenone

Note

重啟核四,關閉維修火力發電廠,減少空氣汙染,以核能養綠能。

支持網路中立性.
Support Net Neutrality.

WPA2 已被 KRACK 攻擊破解!請更新 Wi-Fi 軟體。

不用 Line 改用 Telegram。跟上最新潮流。

歡迎前來本站。

Words Quiz


Search

Music

Counter

2058
天前是本網站的生日

Republic Of China
The strong do what they can and the weak suffer what they must.

Privacy is your right and ability to be yourself and express yourself without the fear that someone is looking over your shoulder and that you might be punished for being yourself, whatever that may be.

It is quality rather than quantity that matters.

I WANT Internet Freedom.

Reality made most of people lost their childishness.

Justice,Freedom,Knowledge.

Support/Donate

This site also need a little money to maintain operations, not entirely without any cost in the Internet. Your donations will be the best support and power of the site.
MethodBitcoin Address
bitcoin1NRMVGGpm2T1pmeejisLSEhCXfCefEW9V4
paypal
Register in linode via invitation link and stay active for three months.Linode

The Lie We Live

youtube

The Questions We Never Ask

youtube

Support The Zeitgeist Movement

The Zeitgeist Movement

Man

youtube

In The Fall

youtube

Facebook is EATING the Internet

Facebook

Categories

Android (4)

Announcement (4)

Arduino (2)

Bash (2)

C (3)

C# (5)

C++ (1)

Experience (41)

Flash (2)

Free (11)

Functions (36)

Games (13)

General (47)

HTML (7)

Java (12)

JS (7)

Mood (24)

Note (26)

Office (1)

PHP (9)

Privacy (4)

Product (10)

Python (4)

Software (9)

The Internet (16)

Tools (13)

VB.NET (8)

WebHosting (7)

Wi-Fi (5)

XML (4)