events - C# two functions called on one keyevent, ok but the first wait for the second to finish -


my first function fill listbox string textbox, second upload file ftp protocol. 2 functions called when press key return , works fine...but listbox filled when second function has uploaded file...ideas first fill listbox?? thanks

  private void invia(object sender, keyeventargs e) {         if (alias != "error:")         {             if (e.keycode == keys.enter || e.keycode == keys.return)             {                 scrivi();                 up();             }         } 

simple solution: cl4ptr4p suggest me make refresh,

private void invia(object sender, keyeventargs e) {         if (alias != "error:")         {             if (e.keycode == keys.enter || e.keycode == keys.return)             {                 scrivi();                 listbox1.update();                 textbox1.update();                 up();             }         } 

however better solution backgroundworker


Comments

Popular posts from this blog

c# - DetailsView in ASP.Net - How to add another column on the side/add a control in each row? -

javascript - firefox memory leak -

Trying to import CSV file to a SQL Server database using asp.net and c# - can't find what I'm missing -