daitolo

How can i get IApplication object.

Discussion created by daitolo on May 28, 2014
Latest reply on Jun 3, 2014 by temge-esristaff
hello,everyone:
How can i get IApplication object,i use c#
my class extends the ESRI.ArcGIS.ADF.BaseClasses.BaseCommand.
i use the way below in the OnCreate(object hook) method;
when i use:
IApplication pApplication = hook  as IApplication;
the pApplication will be null.
and when i use:
IApplication pApplication = (IApplication)hook;
will throw exception, the hook object cannot convert to IApplication;

How can i get IApplication object,someone who can help me,very thank you.

Outcomes