System.Windows.Forms.Cursor.Draw Method

Draws the cursor on the specified surface, within the specified bounds.

Syntax

public void Draw (System.Drawing.Graphics g, System.Drawing.Rectangle targetRect)

Parameters

g
The System.Drawing.Graphics surface on which to draw the System.Windows.Forms.Cursor.
targetRect
The System.Drawing.Rectangle that represents the bounds of the System.Windows.Forms.Cursor.

Remarks

The drawing command originates on the graphics surface represented by the g parameter, but a System.Drawing.Graphics does not contain information about how to render a given image, so it passes the call to the System.Windows.Forms.Cursor. The Cursor.Draw(System.Drawing.Graphics, System.Drawing.Rectangle) method crops the image to the given dimensions and allows you to specify a System.Drawing.Rectangle within which to draw the System.Windows.Forms.Cursor. This method is typically used if you want to draw the cursor on a Graphics surface. For example, you might have a dialog that allows the user to select cursors from a System.Windows.Forms.ListBox control, or a group of System.Windows.Forms.RadioButton controls.

Requirements

Namespace: System.Windows.Forms
Assembly: System.Windows.Forms (in System.Windows.Forms.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0