c# - CefSharp not loading a URL? -
as can see below code trying start browser visiting example.com changing url facebook.com. issue browser wont change url's. loads example.com , remainds on example.com, can me this?
public partial class form1 : form { private chromiumwebbrowser browser; public form1() { initializecomponent(); cefsettings settings = new cefsettings(); cef.initialize(settings); browser = new chromiumwebbrowser("example.com"); browser.isbrowserinitializedchanged += onisbrowserinitializedchanged; this.controls.add(browser); browser.dock = dockstyle.fill; browser.bringtofront(); } private void form1_load(object sender, eventargs e) { } private void onisbrowserinitializedchanged(object sender, isbrowserinitializedchangedeventargs args) { if (args.isbrowserinitialized) { browser.getbrowser().mainframe.loadurl("http://facebook.com"); } } private void form1_formclosing(object sender, formclosingeventargs e) { cef.shutdown(); } }
Comments
Post a Comment