c# - What is the equivalent in VB.NET for a thread delagate? -
i trying convert c# code stack overflow question used in vb.net. using .net framework 4.0. wpf wait window
here code:
thread thread = new thread(() => { window1 w = new window1(); w.show(); w.closed += (sender2, e2) => w.dispatcher.invokeshutdown(); system.windows.threading.dispatcher.run(); }); thread.setapartmentstate(apartmentstate.sta); thread.start();
dim thread new thread(sub() dim w new window1() w.show() addhandler w.closed, sub(sender2, e2) w.dispatcher.invokeshutdown() system.windows.threading.dispatcher.run() end sub) thread.setapartmentstate(apartmentstate.sta) thread.start()
Comments
Post a Comment