I was wondering if I could get some more excellent advice from this site. I'm designing a project that ultimately, among other functions, calculates a download time based upon a file size (which is loaded at run time by the user), a specified percentile of compression (selected by the user - 0-10%) and a download rate numerical up down box (also user specified - 1-10kb/s).
I figured that this just might be a glorified version of a VAT calculator, and I think I've figured out the code, I just dont know how to get it to execute from within the program. I have two text boxes and a button. The boxes show the KB/s rate and the amount of seconds it's going to take to download the file at the specified KB/s rate.
Here is the code
Expand|Select|Wrap|Line Numbers
- 'Dim dblCompressionRate, dblCompression, dblCompressedFileSize, dblTotalSeconds, dblRate, dblSizeText
- filesize = FileLen(file)
- 'Calculate total compressed file size, based upon user settings
- dblCompressionRate = numCompression.Value
- dblSizeText = lblSize.Text
- dblCompression = dblCompressionRate.value / dblSizeText * 10
- dblCompressedFileSize = dblSizeText - dblCompression
- 'Calculate total download time, using compression rate and download speed - and display it in a box
- numKB = dblRate
- dblTotalSeconds = dblCompressedFileSize / dblRate
- txtSec.Text = dblTotalSeconds
- Display total download rate in second box
- txtKB.Text = numKB.Value
Can anyone help?
TIA!
Sam