[Tips][ProgressBar] バースタイルがMarquee時のアニメーションスピードを設定する

スポンサーリンク

ProgressBarコントロールのスタイルがMarqueeに設定されている場合は、進捗はブロックが流れるアニメーションで表されます。

このアニメーションスピードはMarqueeAnimationSpeedプロパティ(単位mSec)で変更することができます。

下記は、Marqueeのアニメーションスピードを変更する例です。

VBの例

' フォームロード時の処理
Private Sub Form4_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
    'バースタイルをMarqueeにする
    ProgressBar1.Style = ProgressBarStyle.Marquee
    ProgressBar2.Style = ProgressBarStyle.Marquee

    '★★★アニメーションスピードの設定(単位mSec)★★★
    ProgressBar1.MarqueeAnimationSpeed = 100
    ProgressBar2.MarqueeAnimationSpeed = 200
End Sub

C#の例

// フォームロード時の処理
private void Form4_Load(object sender, EventArgs e)
{
    // バースタイルをMarqueeにする
    progressBar1.Style = ProgressBarStyle.Marquee;
    progressBar2.Style = ProgressBarStyle.Marquee;

    // ★★★アニメーションスピードの設定(単位mSec)★★★
    progressBar1.MarqueeAnimationSpeed = 100;
    progressBar2.MarqueeAnimationSpeed = 200;
}
Please follow and like us:

コメント

タイトルとURLをコピーしました