Solved

Progress Bars

Posted on 2000-02-19
8
257 Views
Last Modified: 2010-05-02
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
Comment
Question by:wjakubec
  • 2
  • 2
  • 2
  • +2
8 Comments
 
LVL 7

Expert Comment

by:kamall
ID: 2539135
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
 
LVL 7

Expert Comment

by:kamall
ID: 2539141
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
 

Author Comment

by:wjakubec
ID: 2539167
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
3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

 
LVL 14

Accepted Solution

by:
mcrider earned 65 total points
ID: 2539170
The only "trick" is to show a "loading" animation (animated gif) when loading a picture...


Cheers!
0
 
LVL 3

Expert Comment

by:fibdev
ID: 2539876
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
 
LVL 32

Expert Comment

by:Erick37
ID: 2540220
Screen.MousePointer = vbHourglass
    Picture1.Picture = LoadPicture("...")
    Screen.MousePointer = vbDefault
0
 

Author Comment

by:wjakubec
ID: 2553151
That seems to be the best way to handle this, Thanks to everyone who put forth suggestions
0
 
LVL 14

Expert Comment

by:mcrider
ID: 2554060
Thanks for the points! Glad I could help!


Cheers!
0

Featured Post

Best Practices: Disaster Recovery Testing

Besides backup, any IT division should have a disaster recovery plan. You will find a few tips below relating to the development of such a plan and to what issues one should pay special attention in the course of backup planning.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

773 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question