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

I have developed a form in windows application.
In my form I am using picturebox control to set a GIF image.
I call that image in any processing event but that image shown in normal image.

How to show that image in GIF format.

Advance Thanks.
:confused:
Posted
Updated 31-Aug-10 3:36am
v2
Comments
Dalek Dave 31-Aug-10 9:36am    
Minor Edit for Grammar.
DaveAuld 31-Aug-10 9:40am    
Do you mean, you are using an animated gif, but it is only showing the first frame when loaded on your form?
Simon_Whale 31-Aug-10 9:40am    
im not sure on your queation is it to resize the image?

1 solution

Ok.

The standard PictureBox control can display animated GIFs.
Make a PictureBox on your form, set its Image property to an animated GIF, and set its Visible property to false.
Then, when you want to perform your action, set the PictureBox's Visible property to true in code, perform the action, and set it to false again.

Note: that if you perform your action on the UI thread, the form, including the animation, will freeze until it finishes. To solve this, look at the BackgroundWorker component.

If needed, there are few articles based on showing progress kind of animation while another thread is working.
 
Share this answer
 
Comments
T.Saravanann 1-Sep-10 0:45am    
Reason for my vote of 4
Thanks.I have got an idea.
Ganesh Kumar Kaki 8-Sep-10 1:04am    
Reason for my vote of 1
This answer is completely WRONG

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