Solution:
This issue is caused by not loading the CefRuntime in the Program.cs. Simply copying all code in the sample file to your Program.cs.
A
I too had problems launching the browser. I could load all the CEF DLL's, but the browser wouldn't show up! All I got was the spinning wait mouse cursor when hovering above the control.
Unfortunately I haven't found the root of the problem, but since the sample project CefGlue.Client works, I simply copied it to my solution instead.
Also, I don't see how you are initializing the CEF runtime. Have a look in Program.cs in CefGlue.Client how it's done, but it's basically this:
[STAThread]
private static int Main(string[] args)
{
try
{
CefRuntime.Load();
}
catch (DllNotFoundException ex)
{
MessageBox.Show(ex.Message, "Error!", MessageBoxButtons.OK, MessageBoxIcon.Error);
return 1;
}
catch (CefRuntimeException ex)
{
MessageBox.Show(ex.Message, "Error!", MessageBoxButtons.OK, MessageBoxIcon.Error);
return 2;
}
catch (Exception ex)
{
MessageBox.Show(ex.ToString(), "Error!", MessageBoxButtons.OK, MessageBoxIcon.Error);
return 3;
}
var mainArgs = new CefMainArgs(args);
var app = new DemoApp();
var exitCode = CefRuntime.ExecuteProcess(mainArgs, app);
if (exitCode != -1)
return exitCode;
var settings = new CefSettings
{
// BrowserSubprocessPath = @"D:\fddima\Projects\Xilium\Xilium.CefGlue\CefGlue.Demo\bin\Release\Xilium.CefGlue.Demo.exe",
SingleProcess = false,
MultiThreadedMessageLoop = true,
LogSeverity = CefLogSeverity.Disable,
LogFile = "CefGlue.log",
};
CefRuntime.Initialize(mainArgs, settings, app);
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
if (!settings.MultiThreadedMessageLoop)
{
Application.Idle += (sender, e) => { CefRuntime.DoMessageLoopWork(); };
}
Application.Run(new MainForm());
CefRuntime.Shutdown();
return 0;
}