public static void Main(string[] args) { var basepath = Environment.CurrentDirectory; // var cefPath = System.IO.Path.Combine(basepath, "mycef"); // var cfxPath = System.IO.Path.Combine(basepath, "mycef"); // ChromiumStartup.LibCefPath = cefPath; // ChromiumStartup.LibCfxPath = cfxPath; //ChromiumStartup.CefResourcePath = Path.Combine(basepath, "mycef");// or Path.Combine(basePath, "cef","Resource"); ChromiumStartup.Initialize(); Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); Application.Run(new Form1()); }
static void Main(string[] args) { // // you can custome cef lib path // var basePath = System.IO.Path.GetDirectoryName(new System.Uri(System.Reflection.Assembly.GetExecutingAssembly().CodeBase).LocalPath); // ChromiumStartup.LibCefPath = Path.Combine(basePath,"cef"); //ChromiumStartup.LibCfxPath = Path.Combine(basePath, "cef"); //ChromiumStartup.CefResourcePath = Path.Combine(basePath, "cef");// or Path.Combine(basePath, "cef","Resource"); //on windows use ChromiumfxWebBrowser set to false ChromiumStartup.RequireWindowLess = false; //on linux use chromiumfxWebBrowserWindowless set to true //ChromiumStartup.RequireWindowLess = true; ChromiumStartup.Initialize(); Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); Application.Run(new Form1()); }
static void Main(string[] args) { ChromiumStartup.VirtualPath = "www"; ChromiumStartup.EnableMaster = true; ChromiumStartup.SubViewPathName = "views"; ChromiumStartup.MasterHeaderFile = "local://local/www/shared/header.html"; ChromiumStartup.MasterFooterFile = "local://local/www/shared/footer.html"; //on windows use ChromiumfxWebBrowser set to false ChromiumStartup.RequireWindowLess = false; //on linux use chromiumfxWebBrowserWindowless set to true //ChromiumStartup.RequireWindowLess = true; // you can use your custome cef lib path //var basePath = System.IO.Path.GetDirectoryName(new System.Uri(System.Reflection.Assembly.GetExecutingAssembly().CodeBase).LocalPath); //ChromiumStartup.LibCefPath = Path.Combine(basePath, "cef"); //ChromiumStartup.LibCfxPath = Path.Combine(basePath, "cef"); //ChromiumStartup.CefResourcePath = Path.Combine(basePath, "cef");// or Path.Combine(basePath, "cef","Resource"); ChromiumStartup.Initialize(beforeInitsettings: initSettings, beforeCommandLine: initCommandlineArgs); ChromiumStartup.RegisterLocalScheme(); //CfxRuntime.RunMessageLoop(); //Application.ApplicationExit += Application_ApplicationExit; //Application.Idle += BrowserMessageLoopStep; Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); Application.Run(new Form1()); // }