Solved

Progress Bars

Posted on 2000-02-19
8
255 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
 
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
Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 
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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
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…

757 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now