ScrollBarRenderer.DrawVerticalThumb(Graphics, Rectangle, ScrollBarState) 方法

定义

以视觉样式绘制垂直滚动框(又称滚动块)。Draws a vertical scroll box (also known as the thumb) with visual styles.

public:
 static void DrawVerticalThumb(System::Drawing::Graphics ^ g, System::Drawing::Rectangle bounds, System::Windows::Forms::VisualStyles::ScrollBarState state);
public static void DrawVerticalThumb (System.Drawing.Graphics g, System.Drawing.Rectangle bounds, System.Windows.Forms.VisualStyles.ScrollBarState state);
static member DrawVerticalThumb : System.Drawing.Graphics * System.Drawing.Rectangle * System.Windows.Forms.VisualStyles.ScrollBarState -> unit
Public Shared Sub DrawVerticalThumb (g As Graphics, bounds As Rectangle, state As ScrollBarState)

参数

g
Graphics

用于绘制滚动框的 GraphicsThe Graphics used to draw the scroll box.

bounds
Rectangle

用于指定滚动框边界的 RectangleThe Rectangle that specifies the bounds of the scroll box.

state
ScrollBarState

ScrollBarState 值之一,指定滚动框的可视状态。One of the ScrollBarState values that specifies the visual state of the scroll box.

例外

操作系统不支持视觉样式。The operating system does not support visual styles.

-or-

用户在操作系统中禁用视觉样式。Visual styles are disabled by the user in the operating system.

- 或 --or-

视觉样式不应用于应用程序窗口的工作区。Visual styles are not applied to the client area of application windows.

注解

使用此方法之前, 应验证IsSupported属性是否返回。 trueBefore using this method, you should verify that the IsSupported property returns true.

适用于