Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

progress bar ?

Status
Not open for further replies.

ooops

MIS
Dec 21, 2000
91
US
Hello all,

I need your help in making my progress bar work. I have no idea how. The status bar doesn't have to show real percentage of task completed. I just want the have the bar there with color flashing or running until the task is done. Thanks in advance.

PS: this is not for retrieving data from the database so I can't not use this
progressBar.Value = rsRecorset.PercentPosition

Please show me other ways. Thanks Sincerely,
Bao Nghi
 
Here's an idea:

Put a timer on your form and set the interval to the flash interval you want.

In the timer_OnTimer event switch the progress bar's value from min to max and back again:

with prgBar
if .value = .max then
.value = .min
else
.value = .max
end if
end with

If it has problems flashing, then you'll propbably want to put a DoEvent() right after you change its value. This gives the program a chance to do stuff if it is otherwise locked up doing other things.

Hope that helped. -Chris Didion
Matrix Automation, MCP
 
Hi

Thanks so much for your promt response. I think it's exactly what i need. However i'm still unable to make it work, and this is probably the most stupid question you've ever got but since i don't know i have to ask anyway. How do I initialize the timer to work with the progress bar ?
Again, thank you.
 
Set Progressbar to max value at beginning of the code that you want to execute
for example:
Public Sub Main()
progressbar1.value = 100
Connectiontodatabase
progressbar1.value = 30
call calculateinterestrate
progressbar1.value = 50
Call Outstandingbalance
progressbar1.value = 100
end sub

I hope this help
Chris Le
 
can you help me write a short program to find the difference between two times. that is time1-time2
thank
 
Look-up the DateDiff function - it can return the difference in times that you specify. (Minutes, Hours, Seconds, Days, etc.) -Chris Didion
Matrix Automation, MCP
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top