Tuesday, January 5, 2010

Cross-thread operation not valid: Control 'ListBox1' accessed from a thread other than the thread it was created on

This error comes when you tries to add items in list box (or any other control) in thread (or from the function which is being used by thread).

Below is solution:

Private Delegate Sub stringDelegate(ByVal s As String)
Private Sub AddItem(ByVal s As String)
If ListBox1.InvokeRequired Then
Dim sd As New stringDelegate(AddressOf AddItem)
Me.Invoke(sd, New Object() {s})
Else
ListBox1.Items.Add(s)
End If
End Sub


now just pass your value in "AddItem()" and it will be added in listbox.

Share This!


88 comments:

Anonymous said...

Keep posting stuff like this i really like it

Anonymous said...
This comment has been removed by a blog administrator.
Anonymous said...
This comment has been removed by a blog administrator.
Anonymous said...

Hey everybody I found a new way to learn about internet marketing here. It just started tonight at Midnight.
Its brand new on the web..Untouched and ready to drive Millions to your website Instantly

Its pretty exciting wa to get people to your website and complete tutorials on how to do it.

Anonymous said...

Hi folks... I am brand new here but I can't wait to start having/getting several good chats along with you all! I just figured i would introduce myself to you all so hello!

Anonymous said...

Hi,

I just came across to dotnetacademy.blogspot.com from google and I find dotnetacademy.blogspot.com very interesting.
I wish, can make lot's of new friend here :)

Anonymous said...

Hello. And Bye.

Anonymous said...

Hi!,

I'm new here and came to dotnetacademy.blogspot.com from search engine.

I really think this site dotnetacademy.blogspot.com was great and nice to be here.

I'm work on health related work and i have a site which giving out info about [url=http://healthlifesource.com/health-care-information/mens-health]Health News Information[/url]

I love for being health and i do anything to get my health target :)

Healthy life will make your life more longer and your body will become more strong also by do a healthy life will make your face looking fresh.

I really hope everyone here as healthy as i am but if not then you should change your life style immediatly for your own benefits :)

Anonymous said...

I totally support that! Continue that way!

Anonymous said...

You were not mistaken, truly

Anonymous said...

Just found this forum. Hi!!

Anonymous said...

Hello,

Thanks for sharing the link - but unfortunately it seems to be down? Does anybody here at dotnetacademy.blogspot.com have a mirror or another source?


Thanks,
Jack

Anonymous said...

Is it possible to contact administration?
Hih you hear me??

Anonymous said...

For the great posts

I'll be back for sure.


!

Have a wonderful and new year...


[url=http://www.duracleanaustin.com]austin carpet cleaning[/url]

Anonymous said...

Hey everyone, cool message board I find It extremely helpful and it's helped me a great deal
I hope to be able to contribute and assist other people like this message board has helped me

_________________
[url=http://iphoneusers.com]blackra1n[/url]

Anonymous said...

15061.....18873

Anonymous said...

For the awesome posts

I'll be back in a bit.


Thanks!

Have a safe and clean new year...


[url=http://www.duracleanaustin.com]austin carpet cleaning[/url]

Anonymous said...

The show must go on.

Anonymous said...

Great post thanks

Anonymous said...

Delighted to come in contact with every individual at this site

Anonymous said...

Happy to reach all of you on this site

Anonymous said...

I am freshman at this site and as a consequence first off i chooses to say hi to folks

Anonymous said...

Hey im new here.

Im sam, how is everyone?

I look forwards to being a active memeber

Anonymous said...

This is a very interesting site. The content is very informative and I am so glad that I dropped by. Thanks!

______________________________
Virginia Beach Roofing

Anonymous said...

Remarkable things here. I am very happy to
look your article. Thanks so much and I'm looking forward to touch you.

Will you kindly drop me a e-mail?

Anonymous said...

It's appropriate time to make some plans for the future and it's time to be happy.
I've read this post and if I could I wish to suggest you some interesting
things or suggestions. Maybe you can write next articles referring to this article.
I desire to read even more things about it!

Anonymous said...

Sweet blog! I found it while surfing around on Yahoo
News. Do you have any tips on how to get listed in Yahoo News?
I've been trying for a wile but I never seem to get there!
Cheers

Anonymous said...

Hello there! This blog post could not be written any
better! Reading through this article reminds me of myy
previous roommate! He continually kept talking about this.

I most certainly wikl send this post to him. Fairly certain he's going to have a great read.
Thanks for sharing!

Anonymous said...

Hi there to all, how is all, I think every one is getting more from
this site, and your views are pleasant designed for new viewers.

Anonymous said...

Very descriptive article, I enjoyed that bit.
Will there be a part 2?

Anonymous said...

Hey there just wanted to give you a quick heads up.
The words in your post seem to be running off the screen in Opera.
I'm not sure if this is a formatting issue or something to do with internet browser
compatibility but I thought I'd post to let you
know. The style and design look great though!
Hope you get the issue resolved soon. Thanks

Anonymous said...

Wow, incredible blog layout! How long have you been blogging for?
you make blogging look easy. The overall look of your site is great, let alone the content!

Anonymous said...

That is really attention-grabbing, You are an excessively professional blogger.

I have joined your feed and stay up for looking for extra of your
fantastic post. Also, I've shared your site in my social networks

Anonymous said...

I like the helpful info you supply for your articles. I'll bookmark your blog and take a
look at once more right here frequently. I am quite sure I will be
informed a lot of new stuff right right here! Good luck for the following!

Anonymous said...

I just like the valuable information you provide for
your articles. I will bookmark your blog and test once more right here
frequently. I'm rather sure I will be informed
lots of new stuff proper here! Good luck for the following!

Anonymous said...

Very nice post. I just stumbled upon your weblog and wished to
say that I have really enjoyed surfing around your blog posts.

In any case I'll be subscribing to your feed and I hope you write again soon!

Anonymous said...

I think that everything posted made a ton of sense. But,
think about this, what if you were to create a killer title?
I mean, I don't want to tell you how to run your blog, however what if you added a
title that grabbed folk's attention? I mean "Cross-thread operation not valid: Control 'ListBox1' accessed from a thread other than the thread it was created on"
is kinda plain. You should look at Yahoo's front page and note how they create post titles to
grab people interested. You might try adding a video or a pic or two to grab readers
interested about everything've got to say. Just my
opinion, it could bring your website a little livelier.

Anonymous said...

Hi there everyone, it's my first pay a quick visit at
this web page, and paragraph is truly fruitful for me, keep up posting such content.

Anonymous said...

This design is incredible! You most certainly know how to keep a
reader entertained. Between your wit and your videos,
I was almost moved to start my own blog (well, almost...HaHa!) Wonderful job.
I really loved what you had to say, and more than that,
how you presented it. Too cool!

Anonymous said...

Your method of explaining all in this paragraph is actually fastidious, every one can without difficulty
know it, Thanks a lot.

Anonymous said...

Have you ever thought about writing an ebook or guest authoring on other
websites? I have a blog based on the same ideas you discuss
and would really like to have you share some stories/information. I
know my readers would value your work. If you're even remotely interested, feel free to shoot me an e-mail.

Anonymous said...

Hey, I think your site might be having browser compatibility issues.
When I look at your blog site in Opera, it looks fine but when opening in Internet Explorer, it has some overlapping.
I just wanted to give you a quick heads up!
Other then that, terrific blog!

Anonymous said...

I'm not sure where you are getting your information, but good topic.
I needs to spend some time learning more or understanding more.
Thanks for great information I was looking for this info for my mission.

Anonymous said...

Hi there, I found your website via Google at the same time as looking for a comparable subject, your web
site came up, it seems to be great. I've bookmarked it in my
google bookmarks.
Hello there, just become alert to your blog via Google, and located that it's truly informative.
I am going to be careful for brussels. I'll appreciate for those
who continue this in future. Numerous folks might be benefited out of your writing.
Cheers!

Anonymous said...

It's a shame you don't have a donate button! I'd certainly donate to this excellent blog!

I suppose for now i'll settle for bookmarking and adding your RSS feed to
my Google account. I look forward to new updates and will share this
blog with my Facebook group. Chat soon!

Anonymous said...

Greate pieces. Keep posting such kind of information on your blog.
Im really impressed by your blog.
Hi there, You've performed an excellent job. I'll definitely digg it
and for my part recommend to my friends. I'm sure they will be benefited from this
site.

Anonymous said...

Hmm it seems like your website ate my first comment (it was
extremely long) so I guess I'll just sum it up what I wrote
and say, I'm thoroughly enjoying your blog.
I too am an aspiring blog blogger but I'm still new to everything.
Do you have any helpful hints for beginner blog writers?

I'd definitely appreciate it.

Anonymous said...

This excellent website truly has all of the information and facts
I wanted about this subject and didn't know who to ask.

Anonymous said...

Way cool! Some extremely valid points! I appreciate you penning this post and also the rest of the site is extremely good.

Anonymous said...

An outstanding share! I've just forwarded this onto
a coworker who has been doing a little research on this.

And he in fact ordered me lunch simply because I discovered it for him...
lol. So let me reword this.... Thank YOU for the meal!!
But yeah, thanx for spending some time to discuss this matter here on your website.

Anonymous said...

Awesome! Its truly remarkable piece of writing, I have got much clear idea about from this article.

Anonymous said...

This blog was... how do I say it? Relevant!! Finally I've found
something which helped me. Many thanks!

Anonymous said...

Hi, yes this post is genuinely good and I have learned lot of
things from it on the topic of blogging. thanks.

Anonymous said...

First off I would like to say awesome blog! I had a quick question that I'd
like to ask if you do not mind. I was interested to know how you
center yourself and clear your mind prior to writing. I've had a tough time clearing my
mind in getting my ideas out. I do take pleasure in writing
however it just seems like the first 10 to 15 minutes are generally lost just trying to figure out how to begin. Any suggestions or
hints? Appreciate it!

Anonymous said...

Hi! I could have sworn I've been to this site before but after checking through some of the post I realized it's new to me.
Anyhow, I'm definitely happy I found it and I'll be bookmarking and checking back frequently!

Anonymous said...

Wonderful site. A lot of useful information here. I'm sending
it to some buddies ans also sharing in delicious. And certainly, thanks in your
effort!

Anonymous said...

I just like the helpful info you provide on your articles.
I'll bookmark your blog and check once more here regularly.
I am moderately certain I'll be informed lots of new stuff right here!
Good luck for the following!

Anonymous said...

I have been exploring for a little bit for any high-quality articles
or weblog posts on this sort of space . Exploring in Yahoo I eventually stumbled upon this site.
Studying this info So i'm happy to show that I have an incredibly good uncanny feeling I found
out just what I needed. I most indubitably will make certain to don?t overlook this site and give it a glance on a continuing basis.

Anonymous said...

I believe this is among the so much significant info for me.
And i am satisfied reading your article. But want to statement
on few common things, The web site style is perfect,
the articles is in reality excellent : D.
Excellent job, cheers

Anonymous said...

Hey there! This is my 1st comment here so I just wanted to give a quick shout
out and tell you I really enjoy reading your blog posts.
Can you suggest any other blogs/websites/forums that go over the same subjects?
Thanks for your time!

Anonymous said...

Hurrah! At last I got a web site from where I be capable of actually
take helpful data regarding my study and knowledge.

Anonymous said...

Hey! This is my first visit to your blog! We are a collection of
volunteers and starting a new initiative in a
community in the same niche. Your blog provided us valuable information to work on.
You have done a wonderful job!

Anonymous said...

You ought to be a part of a contest for one of the finest sites on the
net. I most certainly will recommend this blog!

Anonymous said...

What i don't understood is in fact how you are no
longer really much more well-preferred than you
might be now. You're very intelligent. You know thus significantly in terms of this matter,
made me in my opinion imagine it from so many numerous angles.
Its like women and men don't seem to be interested unless it's one thing to do with
Woman gaga! Your personal stuffs great. Always maintain it up!

Anonymous said...

No matter if some one searches for his vital thing, thus he/she desires to be available that in detail, so
that thing is maintained over here.

Anonymous said...

I always spent my half an hour to read this webpage's content every day along
with a cup of coffee.

Anonymous said...

I love it when individuals come together and share opinions.

Great blog, stick with it!

Anonymous said...

Valuable information. Lucky me I discovered your site accidentally, and I am stunned why this
twist of fate did not happened earlier! I bookmarked it.

Anonymous said...

It's in fact very difficult in this active life to
listen news on TV, thus I simply use world wide web for that purpose,
and take the latest information.

Anonymous said...

Hello there, just became aware of your blog through Google, and found that it's truly informative.
I'm going to watch out for brussels. I'll appreciate if you continue this in future.
Many people will be benefited from your writing.
Cheers!

Anonymous said...

Very good post. I will be dealing with some of these issues
as well..

Anonymous said...

wonderful submit, very informative. I'm wondering why the opposite specialists of this sector don't notice
this. You must continue your writing. I am sure, you've a huge readers' base
already!

Anonymous said...

Howdy, i read your blog occasionally and i own a similar one and i was
just wondering if you get a lot of spam
responses? If so how do you reduce it, any plugin or anything you can suggest?
I get so much lately it's driving me mad so any assistance is very much appreciated.

Anonymous said...

It's nearly impossible to find experienced people on this
topic, however, you sound like you know what you're talking about!

Thanks

Anonymous said...

Great items from you, man. I have bear in mind your stuff prior to and you're simply too great.

I really like what you've got right here, certainly like what you're
saying and the best way through which you say it. You're making
it enjoyable and you still take care of to keep it wise. I cant wait to learn much more from
you. That is actually a wonderful website.

Anonymous said...

Link exchange is nothing else except it is simply placing the other
person's blog link on your page at proper place and other person will also do same in favor
of you.

Anonymous said...

Write more, thats all I have to say. Literally, it seems as though you relied
on the video to make your point. You obviously
know what youre talking about, why throw away your intelligence on just posting videos to your site when you could be giving us
something informative to read?

Anonymous said...

I am in fact happy to read this blog posts which contains tons of helpful facts, thanks for
providing these kinds of data.

Anonymous said...

Hello There. I found your blog using msn. This is a very well written article.

I'll make sure to bookmark it and come back to read more of
your useful information. Thanks for the post.
I'll certainly comeback.

Anonymous said...

Hi there, I discovered your website by the use of Google at the same time as
looking for a comparable topic, your web site got here up, it appears good.

I've bookmarked it in my google bookmarks.
Hello there, just become alert to your weblog through
Google, and found that it's really informative.
I'm gonna watch out for brussels. I will appreciate should you proceed
this in future. Numerous other people will be benefited out
of your writing. Cheers!

Anonymous said...

Appreciating the hard work you put into your blog and detailed information you provide.
It's awesome to come across a blog every once in a while that isn't the same outdated rehashed information. Wonderful read!
I've saved your site and I'm including your RSS feeds to my Google account.

Anonymous said...

It is actually a great and useful piece of info.
I am happy that you just shared this useful info with us.
Please keep us up to date like this. Thank you for sharing.

Anonymous said...

I’m not that much of a internet reader to be honest but your sites really nice, keep it up!
I'll go ahead and bookmark your site to come back later
on. Cheers

Anonymous said...

You could definitely see your skills in the work you write.
The world hopes for more passionate writers such as you who aren't afraid to mention how
they believe. All the time follow your heart.

Anonymous said...

Heya i'm for the primary time here. I came across this board and I
in finding It really helpful & it helped me out much.
I hope to present something back and help others such as you aided
me.

Anonymous said...

Hi, Neat post. There's an issue with your site in internet explorer, would check this?
IE still is the marketplace chief and a large portion of folks will
omit your excellent writing due to this problem.

Anonymous said...

Hi friends, its impressive post concerning tutoringand fully explained, keep it up all the time.

Anonymous said...

Your style is so unique compared to other people I have read stuff
from. Thank you for posting when you have the opportunity, Guess I'll just book mark this blog.

Powered By Blogger · Designed By Seo Blogger Templates