multithreading - wait for an event regulary -


in program need wait event (keypress) , it's char. after program continue. progress repeat several time. in first try, codes run , character did not save. find out should use threading not familiar it. can 1 give me simple example. first try code

system.windows.forms.sendkeys.send("a"); system.windows.forms.sendkeys.send("b"); 

and in key press event

messagebox.show(e.keychar); 

that result messagebox "a". think program should wait after

system.windows.forms.sendkeys.send("a"); 

i solve use threading , producer/consumer problem. after event wait until event method run.


Comments

Popular posts from this blog

javascript - Google App Script ContentService downloadAsFile not working -

javascript - Function overwritting -

php - Find a regex to take part of Email -