alright..there was already a tutorial on this but this one tells you the amount of progress your code has made...like say a cleaner..it will actually show you the progress of the cleaner.
alright lets get started.
what you need:
a form
a progress bar
and some code
ok
1st make a form
2nd put a porgress bar on it.
now lets say you have a cleaner. and you have the code
Code:
kill("c:\windows\temp\*.*")
kill("C:\ bla\bla\bla\*.*")
kill("C:\ bla\bla\bla\*.*")
kill("C:\ bla\bla\*.*)
kill("C:\ bla\bla\*.*")
kill("C:\ bla\bla\bla.*")
kill("C:\bla\*.*")
you get the idea :P ( those are not real paths
)
now in order to show the progress of all that in the progress bar, you will need to add some stuff to it.
add this in between each file delete
Code:
ProgressBar1.Increment(20) ' the increment can be whatever you like, right now its at 1/5 each time it increments
example:
Code:
kill("c:\windows\temp\*.*")
ProgressBar1.Increment(20)
kill("C:\ bla\bla\bla\*.*")
kill("C:\ bla\bla\bla\*.*")
ProgressBar1.Increment(20)
kill("C:\ bla\bla\*.*)
kill("C:\ bla\bla\*.*")
ProgressBar1.Increment(20)
kill("C:\ bla\bla\bla.*")
kill("C:\bla\*.*")
ProgressBar1.Increment(20)
kill("C:\path\*.*")
kill("C:\path\filename*.*")
ProgressBar1.Increment(20)
then add this at the end of the code
Code:
If ProgressBar1.Value = ProgressBar1.Maximum Then msgbox("done!")
so it should look like this when you are done.
Code:
kill("c:\windows\temp\*.*")
kill("C:\bla\*.*")
ProgressBar1.Increment(20)
kill("C:\ bla\bla\bla\*.*")
kill("C:\ bla\bla\bla\*.*")
ProgressBar1.Increment(20)
kill("C:\ bla\bla\*.*)
kill("C:\ bla\bla\*.*")
ProgressBar1.Increment(20)
kill("C:\ bla\bla\bla.*")
kill("C:\bla\*.*")
ProgressBar1.Increment(20)
kill("C:\path\*.*")
kill("C:\path\filename*.*")
ProgressBar1.Increment(20)
If ProgressBar1.Value = ProgressBar1.Maximum Then msgbox("done!")