次の方法で共有


ControlPaint.DrawMenuGlyph メソッド (Graphics, Int32, Int32, Int32, Int32, MenuGlyph)

メニュー項目のコントロールの指定したメニュー グリフを、指定した範囲内の、指定した表面に描画します。

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(Graphicsgraphics,intx,inty,intwidth,intheight,MenuGlyphglyph);
[C++]
public: static void DrawMenuGlyph(Graphics* graphics,intx,inty,intwidth,intheight,MenuGlyphglyph);
[JScript]
public static function DrawMenuGlyph(
   graphics : Graphics,x : int,y : int,width : int,height : int,glyph : MenuGlyph);

パラメータ

  • graphics
    描画する Graphics
  • x
    描画する四角形の左上隅の x 座標。
  • y
    描画する四角形の左上隅の y 座標。
  • width
    メニュー グリフの幅。
  • height
    メニュー グリフの高さ。
  • glyph
    描画するイメージを指定する MenuGlyph 値の 1 つ。

解説

オーナー描画 MenuItem コントロールの場合は、描画または削除するグリフを正確に判断するために、プロパティ値を検査する必要があります。たとえば、 MenuItem.Checked プロパティが true に設定されていた場合は、 MenuItemCheckmark グリフを描画する必要があります。

必要条件

プラットフォーム: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 ファミリ

参照

ControlPaint クラス | ControlPaint メンバ | System.Windows.Forms 名前空間 | ControlPaint.DrawMenuGlyph オーバーロードの一覧