Export (0) Print
Expand All

ControlPaint.DrawMenuGlyph Method (Graphics, Rectangle, MenuGlyph)

.NET Framework 1.1

Draws the specified menu glyph on a menu item control within the specified bounds and on the specified surface.

[Visual Basic]
Overloads Public Shared Sub DrawMenuGlyph( _
   ByVal graphics As Graphics, _
   ByVal rectangle As Rectangle, _
   ByVal glyph As MenuGlyph _
)
[C#]
public static void DrawMenuGlyph(
 Graphics graphics,
 Rectangle rectangle,
 MenuGlyph glyph
);
[C++]
public: static void DrawMenuGlyph(
 Graphics* graphics,
 Rectangle rectangle,
 MenuGlyph glyph
);
[JScript]
public static function DrawMenuGlyph(
   graphics : Graphics,
 rectangle : Rectangle,
 glyph : MenuGlyph
);

Parameters

graphics
The Graphics to draw on.
rectangle
The Rectangle that represents the dimensions of the glyph.
glyph
One of the MenuGlyph values that specifies the image to draw.

Remarks

When owner-drawing MenuItem controls, you need to verify property values to determine the correct glyph to draw or remove. For example, when the MenuItem.Checked property is set to true, you need to draw a Checkmark glyph on the MenuItem.

Requirements

Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also

ControlPaint Class | ControlPaint Members | System.Windows.Forms Namespace | ControlPaint.DrawMenuGlyph Overload List | MenuItem | MenuGlyph

Show:
© 2014 Microsoft