Register for your free account! | Forgot your password?

Go Back   elitepvpers > Coders Den > .NET Languages
You last visited: Today at 02:20

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



C# Cross Threading

Discussion on C# Cross Threading within the .NET Languages forum part of the Coders Den category.

Reply
 
Old   #1
 
badguy4you's Avatar
 
elite*gold: 0
Join Date: May 2008
Posts: 477
Received Thanks: 178
C# Cross Threading

I was working on Console Applications for a long time and i was able to edit the console from almost everywhere in the project; However, when i migrated to windows forms applications i wondered that i can't edit for example a textBox from any other class because it tells me some error about cross threading

So can any one help me ?
badguy4you is offline  
Old 10/07/2012, 13:32   #2
 
elite*gold: 258
Join Date: May 2010
Posts: 847
Received Thanks: 3,940
-PinkiWinki- is offline  
Old 10/07/2012, 13:38   #3
 
badguy4you's Avatar
 
elite*gold: 0
Join Date: May 2008
Posts: 477
Received Thanks: 178
but i don't know how to create a delegate that encapsulates the method. Could any one help me with a simple code ?!
badguy4you is offline  
Old 10/07/2012, 14:39   #4
 
badguy4you's Avatar
 
elite*gold: 0
Join Date: May 2008
Posts: 477
Received Thanks: 178
What is working but not 100% for me right now is editing the Form.Designer.cs to make the textbox static

However when it disappears whenever i make any change to the design of the form

Help please i am ******* ****** off, either i get cannot access non static or any other **** errors
badguy4you is offline  
Old 10/10/2012, 05:36   #5
 
morningstar261's Avatar
 
elite*gold: 0
Join Date: Dec 2010
Posts: 71
Received Thanks: 135
I can help you with some code to invoke it. That's what you need to do when you change any control from one thread that was created in another. Just PM me I won't post it here.
morningstar261 is offline  
Old 10/13/2012, 10:36   #6
 
elite*gold: 0
Join Date: Sep 2006
Posts: 774
Received Thanks: 8,580
If you weren't a complete ****** you'd have easily figured this out, simply by googling it.
phize is offline  
Thanks
2 Users
Reply


Similar Threads Similar Threads
C# threading mit Invoke nur wie =)
08/28/2012 - .NET Languages - 10 Replies
hallo com, ich habe vor mein tool was ich geschriben habe in mehreren threads laufen zu lassen. doch dabei stosse ich auf ein problem, ich habe eine if anweisung mit einer checkbox doch dies muss ich über invoke machen. doch ich bekomme es nicht hin. habt ihr mir einen Vorschlag? if (checkBox3.Checked == true) Fehler: Fehler 1 Für das nicht statische Feld, die Methode oder die Eigenschaft "WindowsFormsApplication1.Form1.checkBox3&quo t; ist ein Objektverweis...
C++ Threading
03/24/2012 - CO2 Programming - 13 Replies
Anybody got some good threading tutorials in c++? #Edit Using boost would be fine?
Threading
11/18/2011 - CO2 Private Server - 10 Replies
What should I do? A thread for every map that's used by players, a global thread for all players or a single thread for every player.
Multi Threading
08/18/2011 - CO2 Private Server - 6 Replies
I know it's not Conquer related like that, but Multi Threading is a very big part, when developing Conquer PServers. Source: Managed Threading Best Practices
[C#] Cross-Threading ?
10/14/2008 - .NET Languages - 7 Replies
Hello, Is there a flag or whatever that lets me use crossthreading freely? Without the help of a Workerthread. Whenever I try to change a variable it doesn't let me because Crossthreading isn't safe (eg. accessing the variables from other threads), but It's also hard to find a solution for this. I'm starting another thread that contains a function to download the source code of another page and process the wanted information into variables, however I cannot do that with a thread. The only...



All times are GMT +1. The time now is 02:20.


Powered by vBulletin®
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2025 elitepvpers All Rights Reserved.