Cross-thread operation not valid


Author
Message
Martin Oosthuizen
Martin Oosthuizen
Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)
Group: Forum Members
Posts: 2, Visits: 1
Hi there.
I was using the Q1 2007 release until now, but am attempting an upgrade to the latest (2010) version. After redoing the references the program compiled without any big problems. But now, when the software runs, and I drag any tab(document) into another docking position it complains:

System.InvalidOperationException was unhandled
Message="Cross-thread operation not valid: Control '' accessed from a thread other than the thread it was created on."
Source="System.Windows.Forms"
StackTrace:
at System.Windows.Forms.Control.get_Handle()
at System.Windows.Forms.Control.get_InternalHandle()
at System.Windows.Forms.Control.DestroyHandle()
at System.Windows.Forms.Control.Dispose(Boolean disposing)
at System.ComponentModel.Component.Dispose()
at Nevron.UI.WinForm.Controls.NUIDocument.PerformDispose()
at Nevron.UI.NDisposableObject.Dispose(Boolean disposing)
at Nevron.UI.NDisposableObject.Finalize()
InnerException:

The tabs are created like this (ctlWatchList is a user control with a datagrid):
ctlWatchList m_ctlWatchList = new ctlWatchList(this) { Dock = DockStyle.Fill };
NUIDocument docWatchList = new NUIDocument(WatchListTitle, -1, m_ctlWatchList);
m_DockManager.DocumentManager.AddDocument(docWatchList);


Do you have any ideas about what the problem could be?
What other information will you need from me?

I'd really appreciate the help.

Kind regards,
Martin

GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...





Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search