Showing Progress with API Functions...
This is a rather simple piece of code, but I am trying to do something and am not even sure if it is possible.
Here is the code that I am using...
Code:
connect_status.Text = "•Transferring file as ASCII; " & output & vbCrLf & connect_status.Text
DoEvents
flestat = FtpGetFile(hConnection, output, _
main.queue.ListItems(startQueueDownload).Text, False, &H80000000, _
INTERNET_FLAG_TRANSFER_ASCII, 0)
This code downloads a file from an FTP server. I want to have a progress bar or some other means of monitoring the download progress of this file. Unfortunately, the API call will not update its status until it has completely downloaded the file.
Does anyone have any ideas of how I could go about preparing a progress bar to calculate the amount of data that has been sent in the middle of this API call. This could be accomplished by getting the local filesize of the downloaded file, but I need to find a way to temporarily pause the API function while the program calculates the amount of the file that has been downloaded.
Thanks,
Shawn