Windows Develop Bookmark and Share   
 index > Windows Forms General > Show image while waiting for gui action...
 

Show image while waiting for gui action...

Ok,

I have a few actions that take a little while to take place in the gui. When I click a button for the action I would like an animated image to come up to show that it is running, however whenever i set the image to show at the start of the method, the gui gets locked up because of the action that is taking place and the image doesnt show. I can't run it on another thread because i have to return information.

ANy ideas how I can get this picture to show while the thread is busy? Or is there a way to run the action on another thread and return a dataset to the gui thread?

Thanks!
adwins04  Thursday, June 29, 2006 7:35 PM

If you are using 2.0, look into the BackGroundWorker class. It is specifically built to handle situations like yours.

It basically takes off and does a long operation in a separate thread so your application can continue on. There are built in methods to "ReportProgress" back to the main application to you can update things like a progress bar.

Ken_Bussell  Thursday, June 29, 2006 9:29 PM

You can use google to search for other answers

Custom Search

More Threads

• .Net App Updater and Version numbers
• How to emulate mouse click on href text link?
• HelpProvider relation by topic
• How to Lock/Fix ColumnHeader width in LISTVIEW Control
• Windows Drawing
• Problem with access database in vb.net
• Does Tabpage Autosize Prperty Exists?
• How to add value to a speciffic column in listView?
• Event Calling explicitly
• Instansiate an object after form is shown