|
-
Mar 18th, 2017, 02:26 PM
#6
Re: Background Thread causing System.Reflection.TargetInvocationException
 Originally Posted by John_SC
I am dealing only with progress bars and datagridviews.
I only access the progress bar in the background thread so that should be clean
I make make all changes to the dgv in the background thread. i pass in the fields and add rows in the background. I also am changing some colors of cells in the background. I the foreground I do get the number of rows in the background and do read information out of the dgv.
That is pretty much your problem then, you are accessing user interface elements from a background thread. This is a big no-no, you can only access the UI from the main UI thread.
http://www.vbforums.com/showthread.p...ding-in-VB-Net is probably something you will find worth a read.
Last edited by PlausiblyDamp; Mar 18th, 2017 at 02:32 PM.
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|