StandardCommands クラス

定義

ほとんどのアプリケーションで使用できる一連の標準コマンドの識別子を定義します。

public ref class StandardCommands
public class StandardCommands
type StandardCommands = class
Public Class StandardCommands
継承
StandardCommands
派生

次のコード例は、 クラスの StandardCommands メンバーを に追加する方法と、 を MenuCommand に追加 MenuCommand する方法を IMenuCommandService示しています。

   public ref class CDesigner: public ComponentDesigner
   {
   public:
    [PermissionSetAttribute(SecurityAction::Demand, Name="FullTrust")]
      virtual void Initialize( IComponent^ comp ) override
      {
         ComponentDesigner::Initialize( comp );
         IMenuCommandService^ mcs = static_cast<IMenuCommandService^>(comp->Site->GetService( IMenuCommandService::typeid ));
         MenuCommand^ mc = gcnew MenuCommand( gcnew EventHandler( this, &CDesigner::OnF1Help ),StandardCommands::F1Help );
         mc->Enabled = true;
         mc->Visible = true;
         mc->Supported = true;
         mcs->AddCommand( mc );
         System::Windows::Forms::MessageBox::Show( "Initialize() has been invoked." );
      }

   private:
      void OnF1Help( Object^ /*sender*/, EventArgs^ /*e*/ )
      {
         System::Windows::Forms::MessageBox::Show( "F1Help has been invoked." );
      }
   };
}
public class CDesigner : System.ComponentModel.Design.ComponentDesigner 
{
    public override void Initialize(IComponent comp) 
    {
        base.Initialize(comp);

        IMenuCommandService mcs = (IMenuCommandService)comp.Site.
                    GetService(typeof(IMenuCommandService));
        MenuCommand mc = new MenuCommand(new EventHandler(OnF1Help), StandardCommands.F1Help);
        mc.Enabled = true;
        mc.Visible = true;
        mc.Supported = true;
        mcs.AddCommand(mc);
        System.Windows.Forms.MessageBox.Show("Initialize() has been invoked.");
    }

    private void OnF1Help(object sender, EventArgs e) 
    {
        System.Windows.Forms.MessageBox.Show("F1Help has been invoked.");
    }
}
<System.Security.Permissions.PermissionSetAttribute(System.Security.Permissions.SecurityAction.Demand, Name:="FullTrust")> _
Public Class CDesigner
    Inherits System.ComponentModel.Design.ComponentDesigner

    Public Overrides Sub Initialize(ByVal comp As IComponent)
        MyBase.Initialize(comp)

        Dim mcs As IMenuCommandService = CType(comp.Site.GetService(GetType(IMenuCommandService)), IMenuCommandService)
        Dim mc As New MenuCommand(New EventHandler(AddressOf OnF1Help), StandardCommands.F1Help)
        mc.Enabled = True
        mc.Visible = True
        mc.Supported = True
        mcs.AddCommand(mc)
        System.Windows.Forms.MessageBox.Show("Initialize() has been invoked.")
    End Sub

    Private Sub OnF1Help(ByVal sender As Object, ByVal e As EventArgs)
        System.Windows.Forms.MessageBox.Show("F1Help has been invoked.")
    End Sub
End Class

注釈

このクラスは、 CommandID デザイナーが使用できる標準コマンドの識別子を定義します。

クラスからデザイナー メニューにコマンドをStandardCommands追加するには、 の IMenuCommandService メソッドをAddCommand呼び出し、 から StandardCommandsを含む をMenuCommandCommandID追加する必要があります。

コンストラクター

StandardCommands()

StandardCommands クラスの新しいインスタンスを初期化します。

フィールド

AlignBottom

AlignBottom コマンドの CommandID を取得します。 このフィールドは読み取り専用です。

AlignHorizontalCenters

AlignHorizontalCenters コマンドの CommandID を取得します。 このフィールドは読み取り専用です。

AlignLeft

AlignLeft コマンドの CommandID を取得します。 このフィールドは読み取り専用です。

AlignRight

AlignRight コマンドの CommandID を取得します。 このフィールドは読み取り専用です。

AlignToGrid

AlignToGrid コマンドの CommandID を取得します。 このフィールドは読み取り専用です。

AlignTop

AlignTop コマンドの CommandID を取得します。 このフィールドは読み取り専用です。

AlignVerticalCenters

AlignVerticalCenters コマンドの CommandID を取得します。 このフィールドは読み取り専用です。

ArrangeBottom

ArrangeBottom コマンドの CommandID を取得します。 このフィールドは読み取り専用です。

ArrangeIcons

ArrangeIcons コマンドの CommandID を取得します。 このフィールドは読み取り専用です。

ArrangeRight

ArrangeRight コマンドの CommandID を取得します。 このフィールドは読み取り専用です。

BringForward

BringForward コマンドの CommandID を取得します。 このフィールドは読み取り専用です。

BringToFront

BringToFront コマンドの CommandID を取得します。 このフィールドは読み取り専用です。

CenterHorizontally

CenterHorizontally コマンドの CommandID を取得します。 このフィールドは読み取り専用です。

CenterVertically

CenterVertically コマンドの CommandID を取得します。 このフィールドは読み取り専用です。

Copy

Copy コマンドの CommandID を取得します。 このフィールドは読み取り専用です。

Cut

Cut コマンドの CommandID を取得します。 このフィールドは読み取り専用です。

Delete

Delete コマンドの CommandID を取得します。 このフィールドは読み取り専用です。

DocumentOutline

Document Outline コマンドの CommandID を取得します。 このフィールドは読み取り専用です。

F1Help

F1Help コマンドの CommandID を取得します。 このフィールドは読み取り専用です。

Group

Group コマンドの CommandID を取得します。 このフィールドは読み取り専用です。

HorizSpaceConcatenate

HorizSpaceConcatenate コマンドの CommandID を取得します。 このフィールドは読み取り専用です。

HorizSpaceDecrease

HorizSpaceDecrease コマンドの CommandID を取得します。 このフィールドは読み取り専用です。

HorizSpaceIncrease

HorizSpaceIncrease コマンドの CommandID を取得します。 このフィールドは読み取り専用です。

HorizSpaceMakeEqual

HorizSpaceMakeEqual コマンドの CommandID を取得します。 このフィールドは読み取り専用です。

LineupIcons

LineupIcons コマンドの CommandID を取得します。 このフィールドは読み取り専用です。

LockControls

LockControls コマンドの CommandID を取得します。 このフィールドは読み取り専用です。

MultiLevelRedo

MultiLevelRedo コマンドの CommandID を取得します。 このフィールドは読み取り専用です。

MultiLevelUndo

MultiLevelUndo コマンドの CommandID を取得します。 このフィールドは読み取り専用です。

Paste

Paste コマンドの CommandID を取得します。 このフィールドは読み取り専用です。

Properties

Properties コマンドの CommandID を取得します。 このフィールドは読み取り専用です。

PropertiesWindow

PropertiesWindow コマンドの CommandID を取得します。 このフィールドは読み取り専用です。

Redo

Redo コマンドの CommandID を取得します。 このフィールドは読み取り専用です。

Replace

Replace コマンドの CommandID を取得します。 このフィールドは読み取り専用です。

SelectAll

SelectAll コマンドの CommandID を取得します。 このフィールドは読み取り専用です。

SendBackward

SendBackward コマンドの CommandID を取得します。 このフィールドは読み取り専用です。

SendToBack

SendToBack コマンドの CommandID を取得します。 このフィールドは読み取り専用です。

ShowGrid

ShowGrid コマンドの CommandID を取得します。 このフィールドは読み取り専用です。

ShowLargeIcons

ShowLargeIcons コマンドの CommandID を取得します。 このフィールドは読み取り専用です。

SizeToControl

SizeToControl コマンドの CommandID を取得します。 このフィールドは読み取り専用です。

SizeToControlHeight

SizeToControlHeight コマンドの CommandID を取得します。 このフィールドは読み取り専用です。

SizeToControlWidth

SizeToControlWidth コマンドの CommandID を取得します。 このフィールドは読み取り専用です。

SizeToFit

SizeToFit コマンドの CommandID を取得します。 このフィールドは読み取り専用です。

SizeToGrid

SizeToGrid コマンドの CommandID を取得します。 このフィールドは読み取り専用です。

SnapToGrid

SnapToGrid コマンドの CommandID を取得します。 このフィールドは読み取り専用です。

TabOrder

TabOrder コマンドの CommandID を取得します。 このフィールドは読み取り専用です。

Undo

Undo コマンドの CommandID を取得します。 このフィールドは読み取り専用です。

Ungroup

Ungroup コマンドの CommandID を取得します。 このフィールドは読み取り専用です。

VerbFirst

一連の動詞の先頭を取得します。 このフィールドは読み取り専用です。

VerbLast

一連の動詞の末尾を取得します。 このフィールドは読み取り専用です。

VertSpaceConcatenate

VertSpaceConcatenate コマンドの CommandID を取得します。 このフィールドは読み取り専用です。

VertSpaceDecrease

VertSpaceDecrease コマンドの CommandID を取得します。 このフィールドは読み取り専用です。

VertSpaceIncrease

VertSpaceIncrease コマンドの CommandID を取得します。 このフィールドは読み取り専用です。

VertSpaceMakeEqual

VertSpaceMakeEqual コマンドの CommandID を取得します。 このフィールドは読み取り専用です。

ViewCode

ViewCode コマンドの CommandID を取得します。 このフィールドは読み取り専用です。

ViewGrid

ViewGrid コマンドの CommandID を取得します。 このフィールドは読み取り専用です。

メソッド

Equals(Object)

指定されたオブジェクトが現在のオブジェクトと等しいかどうかを判断します。

(継承元 Object)
GetHashCode()

既定のハッシュ関数として機能します。

(継承元 Object)
GetType()

現在のインスタンスの Type を取得します。

(継承元 Object)
MemberwiseClone()

現在の Object の簡易コピーを作成します。

(継承元 Object)
ToString()

現在のオブジェクトを表す文字列を返します。

(継承元 Object)

適用対象

こちらもご覧ください