Home > Net >  Closed Form Form abnormal CefSharp use JS
Closed Form Form abnormal CefSharp use JS

Time:09-18

Recently there is a project, in order to be able to support the H5, using CefSharp,
To the whole beautiful, only one outer Form Form, in addition to maximize, minimize, close button,
JS call c # realize this function, intends to use the page
In the maximize, minimize, stuck in the closed function,
In closing, I use JS to invoke methods on the Winform, direct cleaning process;
 System. The Environment. The Exit (0); 

. But after the window prompts cefsharp browsersubprocess stop working, don't know the specific reason, solving ~

CodePudding user response:

Unused CefSharp, but I think System. The Environment, the Exit (0) is a kind of rough way of termination, like computer drawing power, you can use the Form. The method of Close the tender?

CodePudding user response:

Application. The Current. The Shutdown ();

CodePudding user response:

Private void Form1_FormClosing (object sender, FormClosingEventArgs e)
{
Cef. Shutdown ();
}

CodePudding user response:

Cef. Shutdown ();
  •  Tags:  
  • C#
  • Related