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.

Requirements

Target Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, Windows Vista, Windows Server 2008 family

See Also

© 2011 All Rights Reserved.