Embed Internet Explorer Browser in Winforms using C #
I'm trying to open an IP page using IE (why IE? Because not every Windows has Chrome or Firefox) and present it in a simple Winforms window.
The above web page is a BI (Business Intelligence) web page that will be dynamically refreshed and I want the user to sit and stare at it while the page refreshes with new statistics.
Stream of events:
-
The user enters a specific IP address and clicks "Get webpage".
-
A new Winform window will appear with a dedicated web page.
Also, it would be great if there is an option to hide the IE navigation bar, because I don't want to be able to view in that window.
I tried to do it with CefSharp, but I didn't get anywhere. Every example I've seen was written in asp.
Here's what I have done so far and it doesn't work:
namespace BingoDesktopWindow
{
public partial class BingoWin : Form
{
public BingoWin()
{
InitializeComponent();
CefSettings settings = new CefSettings();
CefSharp.Cef.Initialize(settings);
ChromiumWebBrowser browser = new ChromiumWebBrowser("http://12.345.67.89/bingo/Default.html");
this.browserPanel.Container.Add(browser);
}
}
Thank! }
source to share
Why aren't you using Winforms WebBrowser control. WinForms WebBrowserControl . You can manipulate it more than IE. The web browser control itself comes from IE, so it has all its functionality.
source to share