Updating textbox asynchronously adultdatingconnections com

by  |  13-Feb-2018 15:15

Maybe from it you can decipher what is going wrong and how I can fix it. Background Worker Private Sub BGWorker_Do Work(By Val sender As System.

I also could be missing the point as I feel like I'm doing what you've suggested but still not getting a working result, so clearly I'm still not getting it.

is just a void delegate with no arguments, which means that you can call any method you like as long as it returns void and has no arguments.

updating textbox asynchronously-52

But, once a message comes in, I want to fire off a worker thread that parses the message and puts the new information into a Binding List and can be viewed by a Data Grid View. Argument) End Sub Private Sub BGWorker_Run Worker Completed(By Val sender As System.

Putting the messages into a collection is no problem, but adding new data to the Binding List (even if that adding is only done in a Run Worker Completed method) always fails. First, you're correct in noticing that when the Background Worker is configured from a worker thread, it raises its events on that thread.

In order to do this, you need to pass back some sort of message from the thread that is communicating with the network.

Summing up This is just intended to get you started on your way to safe multithreading with windows forms.

You might consider following a pattern where you display a progress dialog, generate the data on the worker thread, then update the list on the UI thread.

Community Discussion