Click here to Skip to main content
15,900,258 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi ,

In My Project I'm Using a Datagridview to load a excel file.
While loading a excel file it takes more time so in between .
I need to display a picture box with message "Please Wait" in Gif file format.
Can any one help me with right coding using MultiThread Concept.
Posted

You want to research the BackgroundWorker Class[^].

MSDN even has this article[^] on how to use it.

And you can find a lot of other examples and tutorials on google.[^].

The general idea is that you would display the image. Then call the backgroundWorker.Asynch, which kicks of the backgroundWorkser's DoWork. That's the event you would code to load the excel file. You'll need to be careful to not cause cross threading errors by not referencing anything inside the DoWork event that was created on the first thread. (You will probably read about that in the articles.) Then in the backgroundWorker's RunWorkerCompleted event you can hide the image again.

Hope this helps get you started.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900