StandardCommands Class

 

Defines identifiers for the standard set of commands that are available to most applications.

Namespace:   System.ComponentModel.Design
Assembly:  System (in System.dll)


<HostProtectionAttribute(SecurityAction.LinkDemand, SharedState := True)>
<PermissionSetAttribute(SecurityAction.LinkDemand, Name := "FullTrust")>
<PermissionSetAttribute(SecurityAction.InheritanceDemand, Name := "FullTrust")>
Public Class StandardCommands

NameDescription
System_CAPS_pubmethodStandardCommands()

Initializes a new instance of the StandardCommands class.

NameDescription
System_CAPS_pubmethodEquals(Object)

Determines whether the specified object is equal to the current object.(Inherited from Object.)

System_CAPS_protmethodFinalize()

Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.(Inherited from Object.)

System_CAPS_pubmethodGetHashCode()

Serves as the default hash function. (Inherited from Object.)

System_CAPS_pubmethodGetType()

Gets the Type of the current instance.(Inherited from Object.)

System_CAPS_protmethodMemberwiseClone()

Creates a shallow copy of the current Object.(Inherited from Object.)

System_CAPS_pubmethodToString()

Returns a string that represents the current object.(Inherited from Object.)

NameDescription
System_CAPS_pubfieldSystem_CAPS_staticAlignBottom

Gets the CommandID for the AlignBottom command. This field is read-only.

System_CAPS_pubfieldSystem_CAPS_staticAlignHorizontalCenters

Gets the CommandID for the AlignHorizontalCenters command. This field is read-only.

System_CAPS_pubfieldSystem_CAPS_staticAlignLeft

Gets the CommandID for the AlignLeft command. This field is read-only.

System_CAPS_pubfieldSystem_CAPS_staticAlignRight

Gets the CommandID for the AlignRight command. This field is read-only.

System_CAPS_pubfieldSystem_CAPS_staticAlignToGrid

Gets the CommandID for the AlignToGrid command. This field is read-only.

System_CAPS_pubfieldSystem_CAPS_staticAlignTop

Gets the CommandID for the AlignTop command. This field is read-only.

System_CAPS_pubfieldSystem_CAPS_staticAlignVerticalCenters

Gets the CommandID for the AlignVerticalCenters command. This field is read-only.

System_CAPS_pubfieldSystem_CAPS_staticArrangeBottom

Gets the CommandID for the ArrangeBottom command. This field is read-only.

System_CAPS_pubfieldSystem_CAPS_staticArrangeIcons

Gets the CommandID for the ArrangeIcons command. This field is read-only.

System_CAPS_pubfieldSystem_CAPS_staticArrangeRight

Gets the CommandID for the ArrangeRight command. This field is read-only.

System_CAPS_pubfieldSystem_CAPS_staticBringForward

Gets the CommandID for the BringForward command. This field is read-only.

System_CAPS_pubfieldSystem_CAPS_staticBringToFront

Gets the CommandID for the BringToFront command. This field is read-only.

System_CAPS_pubfieldSystem_CAPS_staticCenterHorizontally

Gets the CommandID for the CenterHorizontally command. This field is read-only.

System_CAPS_pubfieldSystem_CAPS_staticCenterVertically

Gets the CommandID for the CenterVertically command. This field is read-only.

System_CAPS_pubfieldSystem_CAPS_staticCopy

Gets the CommandID for the Copy command. This field is read-only.

System_CAPS_pubfieldSystem_CAPS_staticCut

Gets the CommandID for the Cut command. This field is read-only.

System_CAPS_pubfieldSystem_CAPS_staticDelete

Gets the CommandID for the Delete command. This field is read-only.

System_CAPS_pubfieldSystem_CAPS_staticDocumentOutline

Gets the CommandID for the Document Outline command. This field is read-only.

System_CAPS_pubfieldSystem_CAPS_staticF1Help

Gets the CommandID for the F1Help command. This field is read-only.

System_CAPS_pubfieldSystem_CAPS_staticGroup

Gets the CommandID for the Group command. This field is read-only.

System_CAPS_pubfieldSystem_CAPS_staticHorizSpaceConcatenate

Gets the CommandID for the HorizSpaceConcatenate command. This field is read-only.

System_CAPS_pubfieldSystem_CAPS_staticHorizSpaceDecrease

Gets the CommandID for the HorizSpaceDecrease command. This field is read-only.

System_CAPS_pubfieldSystem_CAPS_staticHorizSpaceIncrease

Gets the CommandID for the HorizSpaceIncrease command. This field is read-only.

System_CAPS_pubfieldSystem_CAPS_staticHorizSpaceMakeEqual

Gets the CommandID for the HorizSpaceMakeEqual command. This field is read-only.

System_CAPS_pubfieldSystem_CAPS_staticLineupIcons

Gets the CommandID for the LineupIcons command. This field is read-only.

System_CAPS_pubfieldSystem_CAPS_staticLockControls

Gets the CommandID for the LockControls command. This field is read-only.

System_CAPS_pubfieldSystem_CAPS_staticMultiLevelRedo

Gets the CommandID for the MultiLevelRedo command. This field is read-only.

System_CAPS_pubfieldSystem_CAPS_staticMultiLevelUndo

Gets the CommandID for the MultiLevelUndo command. This field is read-only.

System_CAPS_pubfieldSystem_CAPS_staticPaste

Gets the CommandID for the Paste command. This field is read-only.

System_CAPS_pubfieldSystem_CAPS_staticProperties

Gets the CommandID for the Properties command. This field is read-only.

System_CAPS_pubfieldSystem_CAPS_staticPropertiesWindow

Gets the CommandID for the PropertiesWindow command. This field is read-only.

System_CAPS_pubfieldSystem_CAPS_staticRedo

Gets the CommandID for the Redo command. This field is read-only.

System_CAPS_pubfieldSystem_CAPS_staticReplace

Gets the CommandID for the Replace command. This field is read-only.

System_CAPS_pubfieldSystem_CAPS_staticSelectAll

Gets the CommandID for the SelectAll command. This field is read-only.

System_CAPS_pubfieldSystem_CAPS_staticSendBackward

Gets the CommandID for the SendBackward command. This field is read-only.

System_CAPS_pubfieldSystem_CAPS_staticSendToBack

Gets the CommandID for the SendToBack command. This field is read-only.

System_CAPS_pubfieldSystem_CAPS_staticShowGrid

Gets the CommandID for the ShowGrid command. This field is read-only.

System_CAPS_pubfieldSystem_CAPS_staticShowLargeIcons

Gets the CommandID for the ShowLargeIcons command. This field is read-only.

System_CAPS_pubfieldSystem_CAPS_staticSizeToControl

Gets the CommandID for the SizeToControl command. This field is read-only.

System_CAPS_pubfieldSystem_CAPS_staticSizeToControlHeight

Gets the CommandID for the SizeToControlHeight command. This field is read-only.

System_CAPS_pubfieldSystem_CAPS_staticSizeToControlWidth

Gets the CommandID for the SizeToControlWidth command. This field is read-only.

System_CAPS_pubfieldSystem_CAPS_staticSizeToFit

Gets the CommandID for the SizeToFit command. This field is read-only.

System_CAPS_pubfieldSystem_CAPS_staticSizeToGrid

Gets the CommandID for the SizeToGrid command. This field is read-only.

System_CAPS_pubfieldSystem_CAPS_staticSnapToGrid

Gets the CommandID for the SnapToGrid command. This field is read-only.

System_CAPS_pubfieldSystem_CAPS_staticTabOrder

Gets the CommandID for the TabOrder command. This field is read-only.

System_CAPS_pubfieldSystem_CAPS_staticUndo

Gets the CommandID for the Undo command. This field is read-only.

System_CAPS_pubfieldSystem_CAPS_staticUngroup

Gets the CommandID for the Ungroup command. This field is read-only.

System_CAPS_pubfieldSystem_CAPS_staticVerbFirst

Gets the first of a set of verbs. This field is read-only.

System_CAPS_pubfieldSystem_CAPS_staticVerbLast

Gets the last of a set of verbs. This field is read-only.

System_CAPS_pubfieldSystem_CAPS_staticVertSpaceConcatenate

Gets the CommandID for the VertSpaceConcatenate command. This field is read-only.

System_CAPS_pubfieldSystem_CAPS_staticVertSpaceDecrease

Gets the CommandID for the VertSpaceDecrease command. This field is read-only.

System_CAPS_pubfieldSystem_CAPS_staticVertSpaceIncrease

Gets the CommandID for the VertSpaceIncrease command. This field is read-only.

System_CAPS_pubfieldSystem_CAPS_staticVertSpaceMakeEqual

Gets the CommandID for the VertSpaceMakeEqual command. This field is read-only.

System_CAPS_pubfieldSystem_CAPS_staticViewCode

Gets the CommandID for the ViewCode command. This field is read-only.

System_CAPS_pubfieldSystem_CAPS_staticViewGrid

Gets the CommandID for the ViewGrid command. This field is read-only.

This class defines CommandID identifiers for standard commands that are available to designers.

To add a command from the StandardCommands class to a designer menu, you must call the AddCommand method of an IMenuCommandService and add a MenuCommand that contains a CommandID from StandardCommands.

The following code example illustrates how to add a member of the StandardCommands class to a MenuCommand and how to add the MenuCommand to an IMenuCommandService.

<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

NamedPermissionSet

for full access to system resources. Demand values: LinkDemand, InheritanceDemand. Associated state:

.NET Framework
Available since 1.1

Any public static ( Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Return to top
Show: