c# - CEF - Run window multiple times one after another -


i have winform app starts in background (loop in program.cs). after receiving message shows form cef browser in it

static void main(string[] args) {     while(true){          if(messagereceived()){             if(program.message == 200) {                 application.run(new form());             }             else {                 environment.exit(0);             }         }     } } 

and window:

private cefsharp.winforms.chromiumwebbrowser browserchrome;  private void form_load(object sender, eventargs e) {     this.browserchrome = new cefsharp.winforms.chromiumwebbrowser(string.empty);     this.browserchrome.load("htp://www.google.pl"); } 

it works first time, after close form, app starts check messages again , when want open form again, whole exe crashes: "chromeapp stopped working" error occured in

libcef.dll, version: 3.2785.1482.0, time stamp: 0x57eb4d4e

is possible run form twice chromium or not?

thank help

are sure need use application.run(new form());? maybe new form().show() work instead? launch new form, not entire new application.


Comments

Popular posts from this blog

aws api gateway - SerializationException in posting new Records via Dynamodb Proxy Service in API -

asp.net - Problems sending emails from forum -