Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6190973
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T02:40:55+00:00 2026-05-24T02:40:55+00:00

I have a C# WinForms application and a client has requested to have a

  • 0

I have a C# WinForms application and a client has requested to have a streaming CNN video player integrated in to it. CNN uses a flash player located at http://www.cnn.com/video/live/live.html?stream=stream1

However if I embed a WebBrowser object and point it at the URL, the web site wants to fire a popup outside of my WebBrowser control. If I disable it (using the NewWindow event handlers), it throws up a javascript alert message. If I allow it, it opens a new IE instance outside of my application withe CNN video in it.

The only thought I had was to recreate the HTML and override the javascript settings for their flash object (http://z.cdn.turner.com/cnn/.element/apps/CNNLive/2.1.6.2/assets/scripts/liveplayersettings.js) in order to turn off the popup flags.

Anyone have thoughts on a way to accomplish showing the site while doing so inside of the application?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T02:40:55+00:00Added an answer on May 24, 2026 at 2:40 am

    Ended up hacking the Javascript that CNN uses, dunno how long it’ll last but this was the quickest way to accomplish what I wanted without all the added overhead of the other solutions.

        protected void webBrowser_ProgressChanged(object sender, WebBrowserProgressChangedEventArgs e)
        {
            if (webBrowser.ReadyState == WebBrowserReadyState.Complete && DefaultPage == BrowserPage.CNN)
            {
                HtmlElement head = webBrowser.Document.GetElementsByTagName("head")[0];
                HtmlElement scriptElement = webBrowser.Document.CreateElement("script");
                IHTMLScriptElement element = (IHTMLScriptElement)scriptElement.DomElement;
                string popupBlocker = "if(typeof settings != 'undefined') { settings.FORCE_POPUP = false; }";
                element.text = popupBlocker;
                head.AppendChild(scriptElement);
            }
        }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

We have a typical business application with an Outlook-looking Winforms client talking to asmx
We have a WinForms application written in C# that uses the AxAcroPDFLib.AxAcroPDF component to
I have a library assembly that outputs trace information, and a client winforms application
I have a .net (2.0) winforms application that I need to upgrade on client
I have a client who has a VB 6.0 application with MS Access as
I have published a WinForms application from Visual Studio 2010. It uses .NET 4.0.
I have an ASP.NET web application I built for a client that uses default
I have a WSE 3.0 based web service, and a WinForms client application that
I have a WinForms application with a DataGridView control and a column of DataGridViewButtonCell
I have a winforms application that normally is at about 2-4% CPU. We are

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.