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
Post a Comment