Progress Bar ? (1 Viewer)

spacepro

Registered User.
Local time
Today, 21:44
Joined
Jan 13, 2003
Messages
715
I have an orders form, when the required fields are filled in a msgbox with the order ref will pop up, what I would like to do is before the msgbox pops up , I want to open a form on the afterupdate of the last field entered, which isn't a problem.

The form that I open I want to put a progress bar onto the form, but when the form opens it starts the progress bar for a certain amount of time e.g.5 seconds, then the form closes and pops up the order ref in the msgbox.

Can anyone help me with a bit of code on how I attempt this.
I do have the progress bar on a form, but don't know how to intiate the progress bar.

Many Thanks
Andy:confused:
 

The_Doc_Man

Immoderate Moderator
Staff member
Local time
Today, 15:44
Joined
Feb 28, 2001
Messages
27,128
Actually, I did this another way.

Create two rectangles of the same height and aligned with the same left edge and top edge. They can be either borderless or have a hairline border.

Make one have a background of one color and the other one a background of a different color. I chose to have one bar with a white background and the other with a bright green, but that was because it looked good on my form. I made the green one come on top (Format>>Move to Front). I called them FrontBar and BackBar. FrontBar moves, BackBar does not.

Now when you want to show a progress bar, make them both visible. Set the width of the one in front to 1. Never touch the width of the one that is behind the moving bar.

Code:
FrontBar.Width = 1
FrontBar.Visible = True
BackBar.Visible = True
Me.Repaint

Now, at critical points in your code, do a scaling operation based on the fraction of completion that you have.

Code:
FrontBar.Width = ( BackBar.Width * CurrentValue ) / MaxValue
Me.Repaint


When done, make them both invisible.

Code:
FrontBar.Visible = False
BackBar.Visible = False
Me.Repaint
 

spacepro

Registered User.
Local time
Today, 21:44
Joined
Jan 13, 2003
Messages
715
Hi Doc Man,
Thanks for your feedback , sorry to sound a bit daft, but I want a msgbox to appear after the progress bar as completed, because I need the user to see the order ref and then click ok to acknowledge the reference number.

I do apologise but could you explain what you have suggested in a little more detail.

Many Thanks
Andy
 

spacepro

Registered User.
Local time
Today, 21:44
Joined
Jan 13, 2003
Messages
715
Thanks Docman,

Done it.
Many Thanks
Andy
:cool:
 

Users who are viewing this thread

Top Bottom