Control.ContextMenuStrip プロパティ
アセンブリ: System.Windows.Forms (system.windows.forms.dll 内)

Dim instance As Control Dim value As ContextMenuStrip value = instance.ContextMenuStrip instance.ContextMenuStrip = value
public: virtual property ContextMenuStrip^ ContextMenuStrip { ContextMenuStrip^ get (); void set (ContextMenuStrip^ value); }
/** @property */ public ContextMenuStrip get_ContextMenuStrip () /** @property */ public void set_ContextMenuStrip (ContextMenuStrip value)
public function get ContextMenuStrip () : ContextMenuStrip public function set ContextMenuStrip (value : ContextMenuStrip)
このコントロールの ContextMenuStrip。ContextMenuStrip がない場合は null 参照 (Visual Basic では Nothing)。既定値は null 参照 (Visual Basic では Nothing) です。

コントロールに ContextMenu も割り当てられている場合、ContextMenu は ContextMenuStrip よりも優先されます。

3 つの ToolStripMenuItem オブジェクトを ContextMenuStrip に追加する方法を次のコード例に示します。また、フォームの ContextMenuStrip プロパティを設定する方法も示します。この例を実行するには、contextMenuStrip1 という名前の ContextMenuStrip が配置されているフォームに、次のコードを貼り付けます。次に、フォームのコンストラクタまたは Load イベント ハンドラで InitializeContextMenuStrip を呼び出します。

Windows 98, Windows 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


Weblioに収録されているすべての辞書からControl.ContextMenuStrip プロパティを検索する場合は、下記のリンクをクリックしてください。

- Control.ContextMenuStrip プロパティのページへのリンク