Fixed Price Projects          Flexibele IT oplossingen

Software op maat              Web Applications

Create the background worker:

Dim worker = New BackgroundWorker()

AddHandler worker.DoWork, AddressOf worker_do_work

AddHandler worker.RunWorkerCompleted, AddressOf worker_completed

worker.RunWorkerAsync()

 

To access controls on the calling form or xaml, in the dowork or completed function:

WPF:

   Dispatcher.Invoke(Function() do_stuff(lblResult)) 

 

Winforms:

     Me.BeginInvoke(Sub() lblResult.Text = "Email verstuurd")

Categorie: .NET
Actions: E-mail | Permalink |

waardering