Reputation: 21
I am trying to load 720x480 bitmaps into a picturebox very quickly and while loading the images into the picturebox, the UI of my application slows down considerably. Is there any way around it ? I read that when using a backgroundworker, I cannot load the image into the picturebox control in the DoWork event ..
What are my options ?
Thanks
Upvotes: 2
Views: 1294
Reputation: 40497
It depends on from where you are getting image. If it comes from network drive or from web or database then BackgroundWorker
will definitely help you. Get the image in DoWork
handler and assign the image to PictureBox
in the RunWorkerCompleted
handler.
Upvotes: 2