मैं vb.net का उपयोग कर रहा हूं, और मेरे प्रोग्राम में मुझे यह 'क्रॉसस्ट्रेड ऑपरेशन मान्य नहीं है' त्रुटि जब मैं अपना बैकग्राउंडर चलाता हूं जो इस टेक्स्टबॉक्स को सत्य बना देगा। मेरा मुख्य उप पहले सक्षम को गलत पर बदल देगा, और जब बैकग्राउंडर इसे चलाएगा तो इसे वापस सही कर देगा और बाहर निकलेंगे। यह मुझे एक त्रुटि क्यों देता है? जानकारी के लिए: है सटीक त्रुटि संदेशक्रॉसस्ट्रेड ऑपरेशन मान्य नहीं है ... - VB.NET
at System.Windows.Forms.Control.get_Handle()
at System.Windows.Forms.Control.OnEnabledChanged(EventArgs e)
at System.Windows.Forms.Control.set_Enabled(Boolean value)
at Helium.Form1.BackgroundWorker1_DoWork(Object sender, DoWorkEventArgs e) in C:\Users\Kevin\documents\visual studio 2010\Projects\Helium\Helium\Form1.vb:line 167
at System.ComponentModel.BackgroundWorker.OnDoWork(DoWorkEventArgs e)
at System.ComponentModel.BackgroundWorker.WorkerThreadStart(Object argument)
और यहाँ:: इस के लिए और अधिक कोड है लेकिन मैं इसे किसी भी अधिक भ्रमित करने के लिए नहीं चाहता ...
यहाँ स्टैक ट्रेस है
{"Cross-thread operation not valid: Control 'mainText' accessed from a thread other than the thread it was created on."}
क्या कोई मेरी मदद कर सकता है!
धन्यवाद,
केविन
मुझे लगता है कि होगा त्रुटि संदेश सुंदर आत्म व्याख्यात्मक था। –