Example #1
0
        protected override void OnHandleDestroyed(EventArgs e)
        {
            this.site.DeactivateHtml();
            this.site.CloseHtml();
            this.site = null;

            base.OnHandleDestroyed(e);
        }
Example #2
0
        /// <summary>We can only activate the MSHTML after our handle has been created, so upon creating the handle, we create and activate NativeMethods. If LoadHtml was called prior to this, we do the loading now.</summary>
        /// <param name="e"></param>
        protected override void OnHandleCreated(EventArgs e)
        {
            base.OnHandleCreated(e);

            if (this.firstActivation)
            {
                this.site = new HtmlSite(this);
                this.site.CreateHtml();

                this.isCreated = true;

                this.OnCreated(EventArgs.Empty);

                this.site.ActivateHtml();
                this.firstActivation = false;

                if (this.desiredLoad)
                {
                    this.LoadHtml(this.desiredContent, this.desiredUrl);
                    this.desiredLoad = false;
                }
            }
        }
Example #3
0
        protected override void OnHandleDestroyed(EventArgs e)
        {
            this.site.DeactivateHtml();
            this.site.CloseHtml();
            this.site = null;

            base.OnHandleDestroyed(e);
        }
Example #4
0
        /// <summary>We can only activate the MSHTML after our handle has been created, so upon creating the handle, we create and activate NativeMethods. If LoadHtml was called prior to this, we do the loading now.</summary>
        /// <param name="e"></param>
        protected override void OnHandleCreated(EventArgs e)
        {
            base.OnHandleCreated(e);

            if (this.firstActivation)
            {
                this.site = new HtmlSite(this);
                this.site.CreateHtml();

                this.isCreated = true;

                this.OnCreated(EventArgs.Empty);

                this.site.ActivateHtml();
                this.firstActivation = false;

                if (this.desiredLoad)
                {
                    this.LoadHtml(this.desiredContent, this.desiredUrl);
                    this.desiredLoad = false;
                }
            }
        }