/// <summary> /// Creates an instance of the application /// </summary> /// <param name="application">owner application</param> /// <param name="ownerAssembly">owner assembly</param> public CommonUtils(PowerPointApi.Application application, Assembly ownerAssembly) : base(application, ownerAssembly) { if (null == application) throw new ArgumentNullException("application"); _ownerApplication = application; }
/// <summary> /// Creates an instance of the application /// </summary> /// <param name="application">owner application</param> /// <param name="ownerAssembly">owner assembly</param> public CommonUtils(PowerPointApi.Application application, Assembly ownerAssembly) : base(application, ownerAssembly) { if (null == application) { throw new ArgumentNullException("application"); } _ownerApplication = application; }
private static int GetVBEMainWindowHandle(object applicationProxy) { PowerPointApi.Application app = null; try { Core core = new Core(); app = COMObject.Create <PowerPointApi.Application>(core, applicationProxy); int result = app.VBE.MainWindow.HWnd; return(result); } catch { throw; } finally { if (null != app) { app.DisposeChildInstances(); } } }
/// <summary> /// Creates an instance of the application /// </summary> /// <param name="application">owner application</param> public CommonUtils(PowerPointApi.Application application) : base(application) { _ownerApplication = application; }