- 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.
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.