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

php - Embed BBCode within itself not working -

three.js - how to load gltf in three JS -

sql server - T-SQL: Access DB objects in same schema without qualifying? -