ProgressBarRenderer.DrawVerticalChunks メソッドとは? わかりやすく解説

Weblio 辞書 > コンピュータ > .NET Framework クラス ライブラリ リファレンス > ProgressBarRenderer.DrawVerticalChunks メソッドの意味・解説 

ProgressBarRenderer.DrawVerticalChunks メソッド

メモ : このメソッドは、.NET Framework version 2.0 で新しく追加されたものです。

垂直プログレス バーに表示される一連のプログレス バーの要素を描画します。

名前空間: System.Windows.Forms
アセンブリ: System.Windows.Forms (system.windows.forms.dll 内)
構文構文

Public Shared Sub DrawVerticalChunks
 ( _
    g As Graphics, _
    bounds As Rectangle _
)
Dim g As Graphics
Dim bounds As Rectangle

ProgressBarRenderer.DrawVerticalChunks(g, bounds)
public static void DrawVerticalChunks
 (
    Graphics g,
    Rectangle bounds
)
public:
static void DrawVerticalChunks (
    Graphics^ g, 
    Rectangle bounds
)
public static void DrawVerticalChunks
 (
    Graphics g, 
    Rectangle bounds
)
public static function DrawVerticalChunks
 (
    g : Graphics, 
    bounds : Rectangle
)

パラメータ

g

プログレス バーの描画に使用する Graphics。

bounds

プログレス バーの要素によって埋められる境界を指定する Rectangle。

例外例外
解説解説

このメソッドにより描画されるプログレス バーの各要素は、bounds パラメータの幅に表示されます。プログレス バーの要素の数は、bounds の高さ、および ChunkSpaceThickness と ChunkThickness によって返される値に応じて決定されます。

このメソッドを使用する前に、IsSupported プロパティが true を返すことを確認する必要があります。

使用例使用例

Timer.Tick イベント ハンドラで DrawVerticalChunks メソッドを使用して、プログレス バーの各増分を描画するコード例を次に示します。このコード例は、ProgressBarRenderer クラスのトピックで取り上げているコード例の一部分です。

' Handle the timer tick; draw each progressively larger rectangle.
Private Sub progressTimer_Tick(ByVal
 myObject As [Object], ByVal e As
 EventArgs) 
    If ticks < NumberChunks Then
        Dim g As Graphics = Me.CreateGraphics()
        Try
            ProgressBarRenderer.DrawVerticalChunks(g, progressBarRectangles(ticks))
            ticks += 1
        Finally
            g.Dispose()
        End Try
    Else
        progressTimer.Enabled = False
    End If

End Sub 'progressTimer_Tick

// Handle the timer tick; draw each progressively larger rectangle.
private void progressTimer_Tick(Object myObject,
 EventArgs e)
{
    if (ticks < NumberChunks)
    {
        using (Graphics g = this.CreateGraphics())
        {
            ProgressBarRenderer.DrawVerticalChunks(g,
                progressBarRectangles[ticks]);
            ticks++;
        }
    }
    else
    {
        progressTimer.Enabled = false;
    }
}
    // Handle the timer tick; draw each progressively larger rectangle.
private:
    void progressTimer_Tick(Object^ myObject, EventArgs^ e)
    {
        if (ticks < NumberChunks)
        {
            Graphics^ g = this->CreateGraphics();
            ProgressBarRenderer::DrawVerticalChunks(g,
                progressBarRectangles[ticks]);
            ticks++;
        }
        else
        {
            progressTimer->Enabled = false;
        }
    }
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
ProgressBarRenderer クラス
ProgressBarRenderer メンバ
System.Windows.Forms 名前空間



英和和英テキスト翻訳

英語⇒日本語日本語⇒英語

辞書ショートカット

すべての辞書の索引

「ProgressBarRenderer.DrawVerticalChunks メソッド」の関連用語

ProgressBarRenderer.DrawVerticalChunks メソッドのお隣キーワード
検索ランキング

   

英語⇒日本語
日本語⇒英語
   



ProgressBarRenderer.DrawVerticalChunks メソッドのページの著作権

   
日本マイクロソフト株式会社日本マイクロソフト株式会社
© 2026 Microsoft.All rights reserved.

©2026 GRAS Group, Inc.RSS