Vizible’s Blog

C# – Cross-thread operation exeption.

Posted in Logs by wearetherock on July 13, 2009

Form & Wiimote Thread ตีกัน

System.InvalidOperationException was unhandled
Message=”Cross-thread operation not valid: Control ‘NotifyDialog’ 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_WindowStyle()
at System.Windows.Forms.Form.get_CreateParams()
at System.Windows.Forms.Control.UpdateStylesCore()
at System.Windows.Forms.Control.UpdateStyles()
at System.Windows.Forms.Form.set_Opacity(Double value)
at XbmcTestD.NotifyDialog.HideDialog() in C:\Users\BEER\Documents\Visual Studio 2008\Projects\XbmcTestB\XbmcTestD\NotifyDialog.cs:line 235
at XbmcTestD.NotifyDialog.wm_WiimoteChanged(Object sender, WiimoteChangedEventArgs args) in C:\Users\BEER\Documents\Visual Studio 2008\Projects\XbmcTestB\XbmcTestD\NotifyDialog.cs:line 118
at WiimoteLib.Wiimote.OnReadData(IAsyncResult ar)
at System.IO.FileStream.AsyncFSCallback(UInt32 errorCode, UInt32 numBytes, NativeOverlapped* pOverlapped)
at System.Threading._IOCompletionCallback.PerformIOCompletionCallback(UInt32 errorCode, UInt32 numBytes, NativeOverlapped* pOVERLAP)
InnerException:

Advertisements

One Response

Subscribe to comments with RSS.

  1. vizible said, on July 13, 2009 at 1:51 pm

    This thread is not too hard to understand.
    http://www.developerfusion.com/forum/thread/43081/


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: