c# - Opening another form with a method/function that is on another thread? -
is possible open second form, when method/or function opening 2nd form on thread?
i have read other threads related this.. seems cant figure out how use invoke
here's how open 2nd form when im calling this.. nothing happens..(because on 2nd thread)
timermode f2 = new timermode(); f2.showdialog();
please me. newbie multi -threading..
it should doing something. because showdialog
run own message loop. timermode
form should @ least visible , functioning. but, right, not best practice if form interacting other forms running on main ui thread.
here how might it.
anotherform.invoke( (methodinvoker)(() => { new timermode().showdialog(); }));
note anotherform
reference 1 of other forms hosted on main ui thread.
Comments
Post a Comment