wait for completing operation in awesomium in C#

444 views Asked by At

i'm developing an app using awesomium and c#

look at this line of code:

browser.ExecuteJavascriptWithResult("rand()");

when this line execute, the webpage says "Please wait..." and a image with low opacity shown , and can't click or run any script until a few seconds

is there any way to wait for this action in my app?

1

There are 1 answers

1
sm.abdullah On BEST ANSWER

you can do something like this..

 int Sec = 1000;  // 1 sec 1000ms
    int i = 0 ;
    do{
       //do application events
      Application.DoEvents();
       //sleep for 1 mili second 
      System.Threading.Thread.Sleep(1);
      i++;  //increase i by 1 milisecond

    }while((Sec*5) > i );

// here you can do something after wating..