public void DoCapture()
        {
            // show the form w/o activating then make it invisible
            User32.SetWindowPos(Handle, HWND.BOTTOM, -1, -1, 1, 1, SWP.NOACTIVATE);
            Visible = false;

            // determine the url used for navigation
            string navigateUrl;

            if (_htmlScreenCaptureCore.HtmlUrl != null)
            {
                navigateUrl = _htmlScreenCaptureCore.HtmlUrl;
            }
            else
            {
                _contentFile = TempFileManager.Instance.CreateTempFile("content.htm");
                using (TextWriter textWriter = new StreamWriter(_contentFile, false, Encoding.UTF8))
                {
                    String html = _htmlScreenCaptureCore.HtmlContent;

                    //add the "Mark Of The Web" so that the HTML will execute in the Internet Zone
                    //otherwise, it will execute in the Local Machine zone, which won't allow JavaScript
                    //or object/embed tags.
                    html = HTMLDocumentHelper.AddMarkOfTheWeb(html, "about:internet");

                    textWriter.Write(html);
                }
                navigateUrl = _contentFile;
            }

            // navigate to the file then wait for document complete for further processing
            _browserControl.DocumentComplete += new BrowserDocumentEventHandler(_browserControl_DocumentComplete);
            _browserControl.Navigate(navigateUrl);
        }
        public BlogEditingTemplate(string template, bool containsTitle)
        {
            ContainsTitle = containsTitle;
            if (!ValidateTemplate(template, ContainsTitle))
            {
                Trace.WriteLine("Invalid editing template detected");
                template = GetDefaultTemplateHtml(containsTitle);
            }

            //sandbox the template in the Internet Security zone
            template = HTMLDocumentHelper.AddMarkOfTheWeb(template, "about:internet");
            Template = template;
        }
        private void DisplayHtml(string html, Formatter formatter)
        {
            if (htmlPath == null)
            {
                htmlPath = TempFileManager.Instance.CreateTempFile("video.html");
            }

            html = formatter(html);

            html = HTMLDocumentHelper.AddMarkOfTheWeb(html, "about:internet");

            FileHelper.WriteFile(htmlPath, html, false, Encoding.UTF8);

            previewBox.Navigate(htmlPath);
        }