Exemple #1
0
        public Form1()
        {
            //
            // Required for Windows Form Designer support
            //
            InitializeComponent();

            //htmlControl1.EnhanceBrowserSecurityForProcess();
            htmlControl1.FrameDownloadEnabled = true;
            htmlControl1.FlatScrollBars       = true;
            bool useX = false;

            if (useX)
            {
                HtmlControl.SetInternetFeatureEnabled(
                    InternetFeatureList.FEATURE_RESTRICT_ACTIVEXINSTALL,
                    SetFeatureFlag.SET_FEATURE_ON_PROCESS, true);
                htmlControl1.ActiveXEnabled = true;
            }
            else
            {
                htmlControl1.ActiveXEnabled = true;
                HtmlControl.SetInternetFeatureEnabled(
                    InternetFeatureList.FEATURE_SECURITYBAND,
                    SetFeatureFlag.SET_FEATURE_ON_PROCESS, true);
                HtmlControl.SetInternetFeatureEnabled(
                    InternetFeatureList.FEATURE_RESTRICT_ACTIVEXINSTALL,
                    SetFeatureFlag.SET_FEATURE_ON_PROCESS, false);
                HtmlControl.SetInternetFeatureEnabled(
                    InternetFeatureList.FEATURE_RESTRICT_FILEDOWNLOAD,
                    SetFeatureFlag.SET_FEATURE_ON_PROCESS, false);
            }

            htmlControl1.ImagesDownloadEnabled = true;
            htmlControl1.SilentModeEnabled     = false;
            htmlControl1.Clear();
            htmlControl1.ScriptObject = new HTMLBrowserExternalCallImplementation();
            htmlControl1.Html         = htmText;

            chkAllowActiveX.Checked = htmlControl1.ActiveXEnabled;
            wheelSupport            = new WheelSupport(this);
        }