Progress Bars

I have a several large images that take anywhere from 10 to 25 seconds to load on to a form. I would like to have a progress bar appear and do its thing to show the progress of the image thats being loaded while the images is loading.  Any ideas?
wjakubecAsked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
mcriderConnect With a Mentor Commented:
The only "trick" is to show a "loading" animation (animated gif) when loading a picture...


Cheers!
0
 
kamallCommented:
Unfortunately, you can't. LoadPicture is a built-in function for the picture box, image box and forms. Once it is entered,  control will not return to VB until it is completed.
Regards.
0
 
kamallCommented:
Of course, since you load multiple pictures, you can just show a progress bar that indicates an approximate value. Example:

Picture1.Picture = LoadPicture(...)
ProgressBar1.Value=20

Picture2.Picture = LoadPicture(...)
ProgressBar1.Value=50
....
....
etc.

Something like that...
0
Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
wjakubecAuthor Commented:
If thats the case then thats the case and I will pass on the points but there hase to be som work around or trick.  I will be opening only one image at a time.
0
 
fibdevCommented:
If these images are loading onto your main form, then use a splash screen with a timer that lasts the approximate time of the image load (This load time will vary according to processor speed).

If these images appear on a subsequent form, then call the form to load when the main form loads.

Sub Form1_Load()
load frmSlowForm
End Sub

Then when you want to display the form ...

just use frmSlowForm.Show

Don't unload the form until your done with it or it will make you wait again.
0
 
Erick37Commented:
Screen.MousePointer = vbHourglass
    Picture1.Picture = LoadPicture("...")
    Screen.MousePointer = vbDefault
0
 
wjakubecAuthor Commented:
That seems to be the best way to handle this, Thanks to everyone who put forth suggestions
0
 
mcriderCommented:
Thanks for the points! Glad I could help!


Cheers!
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.