Hi,
I have two machines, one is an old toshiba laptop that I use at home for development, the other is a 1 year old dell at work. Both are running the same version of visual studio 2008. I have been, for the last several months, building a project for a client. It runs fine on my old laptop, but if I run it in the same environment at work I get cross threading issues, anybody have an idea why? Is there something in the project/environment that I need to check or uncheck...
The problem has occurred ever since I added a tab control to the main user interface. The cross threading error occurs when loading the main form, when the tab control is dynamically resized - I have made it react like an expandable panel so the user can hide it if it is not being used.
This is the line is fails on, this is in the main load section:
expandable_tabcontrol.Left += expandable_tabcontrol.Width;
This is the error message:
An unhandled exception of type 'System.InvalidOperationException'
occurred in System.Windows.Forms.dll
Additional information: Cross-thread operation
not valid: Control 'frmUserInterFace' accessed
from a thread other than the thread it was created on.
Runs fine at home, fails at work...
Thanks, R.