Solved

Progress Bars

Posted on 2000-02-19
8
260 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

 
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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

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.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
How does CurrentUser work? 10 45
Child Form in front 4 66
How to read File Date Created using VB6 8 73
VB6 - Scroll Mouse wheel on Picturebox 13 122
Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
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…

710 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