First of all, sorry for adding the (Very Urgent) to the title.
We have to demo this program in 4 hours and everything is working but the updating of the display.
I have a bitmap displayed in a Graphics Rectangle.
I manually set the pixels of the bitmap based on info coming in from the serial port.
When I have received 98 values, I want to redraw the scene, I get a "System.ArgumentException: Parameter is not valid" exception:
Code |
So I'm thinking that the problem is cross thread calling so I tried:
Code |
I also tried the proper way
Code Code Code Code Code Code
Code |
But the error keeps appearing.
I run the exact same method when I first paint the Form and it works fine.
I am working with VS2010 for the first time so I thought it may have been a change from .net 3.5 to .net 4 so I switched back to .net 3 but it still doesn't work.
Please help!!
Thanks a mil in advance
Paul
ps->The entire code is attached

Answers
Know the answer? Post it. Somebody with the same question will find it here.