This documentation is archived and is not being maintained.

ControlPaint.DrawMenuGlyph Method (Graphics, Int32, Int32, Int32, Int32, MenuGlyph)

.NET Framework 1.1

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

[Visual Basic]
Overloads Public Shared Sub DrawMenuGlyph( _
   ByVal graphics As Graphics, _
   ByVal x As Integer, _
   ByVal y As Integer, _
   ByVal width As Integer, _
   ByVal height As Integer, _
   ByVal glyph As MenuGlyph _
)
[C#]
public static void DrawMenuGlyph(
 Graphics graphics,
 int x,
 int y,
 int width,
 int height,
 MenuGlyph glyph
);
[C++]
public: static void DrawMenuGlyph(
 Graphics* graphics,
 int x,
 int y,
 int width,
 int height,
 MenuGlyph glyph
);
[JScript]
public static function DrawMenuGlyph(
   graphics : Graphics,
 x : int,
 y : int,
 width : int,
 height : int,
 glyph : MenuGlyph
);

Parameters

graphics
The Graphics to draw on.
x
The x-coordinate of the upper left corner of the drawing rectangle.
y
The y-coordinate of the upper left corner of the drawing rectangle.
width
The width of the menu glyph.
height
The height of the menu 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

Show: