Crossthreading Problem

by basti 30.01.2009 23:41:00

Jeder Entwickler stand schon einmal vor genau diesem Problem. Man hat versucht aus einem anderen Thread versucht die Oberffläche, welche im Main-Thread läuft, zu aktualisieren.

Umachtsam wie man ja so ist, macht es direkt BOOM und man bekommt eine Exception die einem sagt wie doof man doch ist so etwas zu tun.

Man hat dann normalerweise eben kurz ein paar Invokes benutzt und alles funktionierte.

Doch jetzt der Hammer überhaupt, eigentlich darf man das gar nicht erzählen, aber ich mach es trotzdem. Ich wette ihr kennt es nicht und ich möchte das nur als "Good to know" anbieten, bitte nicht benutzen, very unsauber.

Es gibt im .NET Framework eine Eigenschaft die man setzen kann, damit diese Checks auf illegale threadübergreifende Vorgänge NICHT gemacht wird und man somit diese Exception nicht bekommt und alles auch OHNE Invokes funktioniert.

System.Windows.Forms.Form.CheckForIllegalCrossThreadCalls = false;

Probiert es doch mal aus, aber bitte nicht produktiv benutzen.

Gib die erste Bewertung ab

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags: ,

.NET

Ähnliche Beiträge

Kommentare

25.12.2009 06:53:14

quick loans

I thought it was going to be some boring old post, but it really compensated for my time. I will post a link to this page on my blog. I am sure my visitors will find that very useful

quick loans

08.01.2010 21:34:04

توبيكات

Greetings, Ilike <B>your blog</B> very much. It has usefullinfo in it. I came here from search engine msn while was searching for automotive info. Keep working on blog I d place bookmark, thanks.

توبيكات sa

16.01.2010 21:27:07

old tables

old tables

old tables

10.02.2010 23:45:37

teeth whitening reviews

I admire the valuable information you offer in your articles. I will bookmark your blog and have my children check up here often. I am quite sure they will learn lots of new stuff here than anybody else!

teeth whitening reviews

13.02.2010 11:55:32

Colon cleansing

Super-Duper site! I am loving it!! Will come back again - taking you feeds also, Thanks.

Colon cleansing

02.03.2010 20:57:01

instant loans

Very interesting post - Might be old news, but it was news to me.

instant loans

07.03.2010 19:17:30

cash loans

This is such a great resource that you are providing and you give it away for free. I love seeing websites that understand the value of providing a quality resource for free. It?s the old what goes around comes around routine. Big thanks for the useful info i found on Crossthreading Problem.

cash loans

07.03.2010 20:45:03

Stretch mark removal

Thank you for another great article. Where else could anyone get that kind of information in such a perfect way of writing? I have a presentation next week, and I am on the look for such information.

Stretch mark removal

Kommentar schreiben


(Zeigt dein Gravatar icon)  

  Country flag

[b][/b] - [i][/i] - [u][/u]- [quote][/quote]



Live Vorschau

14.03.2010 20:39:42

Powered by BlogEngine.NET 1.3.0.0
Theme by Mads Kristensen

Über den Autor

Sebastian Loers Sebastian Loers

Softwareentwickler
(Querdenker-Software)

Community Program Manager
(AntMe!)

Join .NET User Group Dortmund

XING
E-mail me Send mail

Anzeigen


Letzten Beiträge

Letzten Kommentare

Autoren

Disclaimer

The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway.

© Copyright 2010

Sign in

Clustermap

Locations of visitors to this page

Email me Email me  |  AntMe!  |  .NET User Group Dortmund  |  Email me Blog abonnieren