Introduction

MarqueeLabel要是沒記錯,應該是去年無聊時寫的控制項 。該控制項的功能就如同它的名稱一樣就只是跑馬燈的效果而已。

加入控制項

Step1.工具箱=>滑鼠右鍵=>選擇項目

[Control]MarqueeLabel 1.0

Step2.選取控制項檔案

[Control]MarqueeLabel 1.0

[Control]MarqueeLabel 1.0

[Control]MarqueeLabel 1.0

完成後就會在工具箱內看到MarqueeLabel控制項

[Control]MarqueeLabel 1.0

類別成員

欲使用MarqueeLabel控制項,首先須了解下面成員 :

屬性

名稱說明
EnableMarquee是否啟動跑馬燈
GradientTextStartColor漸層起始顏色
GradientTextEndColor漸層結束顏色
TickInterval跑馬燈觸發毫秒

方法

名稱說明
StartMarquee起動跑馬燈
StopMarquee停止跑馬燈
PauseMarquee暫停跑馬燈

簡易範例

Step1.放入MarqueeLabel控制項

[Control]MarqueeLabel 1.0

Step2.設定漸層色與欲顯示的字串

若要調整漸層色可透過設定GradientTextStartColor與GradientTextEndColor屬性,而要設定欲顯示的字串可修改Text屬性值。

[Control]MarqueeLabel 1.0

Step3.啟動跑馬燈

欲啟動跑馬燈可透過設定EnableMarquee屬性或是StartMarquee方法。

[Control]MarqueeLabel 1.0 [Control]MarqueeLabel 1.0

[Control]MarqueeLabel 1.0 [Control]MarqueeLabel 1.0

Download

MarqueeLabel 1.0.zip