[RESOLVED] im trying to make a download limiter
hi
is this right to figureout megabytes?
Code:
Dim c As New CIpHelper, R As Double, S As Double
c.InitInterfaces
If FirstTime Then
FirstTime = False
enviados = Format(c.BytesSent / 1024, ".0")
recibidos = Format(c.BytesReceived / 1024, ".0")
Else 'FIRSTTIME = FALSE/0
R = ((c.BytesReceived / 1024) - recibidos) * 8
S = ((c.BytesSent / 1024) - enviados) * 8
End If
Label1.Caption = "U:" & Format(S, ".0")
Label2.Caption = "D:" & Format(R, ".0")
Re: im trying to make a download limiter
A KiloByte is 1024 Bytes
A megabyte is 1024*1024 bytes
Re: im trying to make a download limiter
Re: im trying to make a download limiter
Why is what multiplied by 8? You wrote the code don't you know?
Hint: there are 8 bits in a byte
Re: im trying to make a download limiter