vb.net - Convert InvokeRequired to Dispatch in VB WPF -


hello i'm stuck on last section of code in i'm converting standard vb vb wpf using invoke commands i'm struggling use them within vb wpf. i'm on final 2 lines can't seem figure out how rewrite it, possibly help?

 if me.invokerequired         me.invoke(new methodinvoker(addressof accesspicture)) 

i'm using vb wpf

you can know if invocation required checking if current thread ui thread , invoke dispatcher thread if it's required here give example in c# , it's totally same logic in vb

public void eventhandler(object object,eventargs e) { if (this.dispatcher.thread != system.threading.thread.currentthread) {  // invoke using this.dispatcher.invoke(new eventhandler(eventhandler),object,e) } else {    //execute code }  } 

Comments

Popular posts from this blog

android - net_scheduler holding wakelock -

sql - MySQL : Getting Entries from a many-to-many table -

java - Retrieving data from database using jsp (Hibernate + Spring + Maven) -