Progess bar in a file loading process
Posted on 2000-03-30
Hello experts. I posted a question about loading big files. Here's another related one, which I choose to make its own question of.
I'm making a program which loads (sometimes) big textfiles into a textbox. Now I want to add a progressbar to the form, to make users feel better when loading big files.
The question is: How can add a progressbar to the file loading? That is, what parameter should the bar be connected to, and what is the maximum value?
Here's the code I use for importing the files:
sFile = CommonDialog1.FileName
If sFile <> "" Then
iFn = FreeFile
Open sFile For Input As #iFn
Do While Not EOF(iFn)
Line Input #iFn, sLine
txtInput = txtInput & sLine & vbCrLf