Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 284
  • Last Modified:

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?
0
wjakubec
Asked:
wjakubec
  • 2
  • 2
  • 2
  • +2
1 Solution
 
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
 
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
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
mcriderCommented:
The only "trick" is to show a "loading" animation (animated gif) when loading a picture...


Cheers!
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

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

  • 2
  • 2
  • 2
  • +2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now