multithreading - C# - Text box loads before frame -


i'll explain problem accurate can.

i have win form has button loads form.

here code of button loads second form:

        clearall();          if (directory.exists(temp_path))             directory.delete(temp_path, true);          if (checkreq())         {             operationscanceled = false;             url = urltextbox.text;             downloadform.show();             download();         } 

this form "downloadform" created in constructor of main form. last line inits download procedure, fills text box in "downloadform".

so, whenever press button, text box , it's text loads second before rest of controls , form "downloadform".

i thought "downloadform.show()" load in screen before jumping next line, "download()", don't why happening.

could because of threads? "downloadform" has thread , "download()", method in main form being executed in thread?

so, basically, how can resolve this? there way load gui before jump or call "download()" without using form's events or async/await?

thanks in advance,

regards.


Comments

Popular posts from this blog

angular - Ionic slides - dynamically add slides before and after -

minify - Minimizing css files -

Add a dynamic header in angular 2 http provider -