ESRI.ArcGIS.ADF.Local
OnCreate Method
See Also  Send Feedback
ESRI.ArcGIS.ADF.BaseClasses Namespace > BaseCommand Class : OnCreate Method




hook
A reference to the application in which the command was created. The hook may be an IApplication reference (for commands created in ArcGIS Desktop applications) or an IHookHelper reference (for commands created on an Engine ToolbarControl).
Called when the command is created inside the application.

Syntax

Visual Basic (Declaration) 
Public MustOverride Sub OnCreate( _
   ByVal hook As Object _
) 
Visual Basic (Usage)Copy Code
Dim instance As BaseCommand
Dim hook As Object
 
instance.OnCreate(hook)
C# 
public abstract void OnCreate( 
   object hook
)

Parameters

hook
A reference to the application in which the command was created. The hook may be an IApplication reference (for commands created in ArcGIS Desktop applications) or an IHookHelper reference (for commands created on an Engine ToolbarControl).

Remarks

Note to inheritors: classes inheriting from BaseCommand must always override the OnCreate method. Use this method to store a reference to the host application, passed in via the hook parameter.

See Also

© 2010 All Rights Reserved.