ProgressBarRenderer.DrawVerticalChunks メソッド
アセンブリ: System.Windows.Forms (system.windows.forms.dll 内)



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

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; } }

Windows 98, Windows 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


Weblioに収録されているすべての辞書からProgressBarRenderer.DrawVerticalChunks メソッドを検索する場合は、下記のリンクをクリックしてください。

- ProgressBarRenderer.DrawVerticalChunks メソッドのページへのリンク