TotalBytesToReceiveHex
Interface AntViewDownloadOperation
Type: Property
Access: Read
Data Type: String
Same as TotalBytesToReceive, but the total bytes amount is returned as a hexadecimal string.
Example code in VB6:
Private Sub EdgeBrowser_OnDownloadStarting(Cancel As Boolean, Handled As Boolean, ByVal DownloadOperation As AntviewAx.AntViewDownloadOperation, ResultPath As String, ResultFileName As String)
Dim TotalBytes As Integer
Dim cTB As Currency
Debug.Print "downloading"
ResultPath = "c:\testantview"
Debug.Print DownloadOperation.URI
Debug.Print DownloadOperation.TotalBytesToReceiveHex
TotalBytes = Abs("&H" & DownloadOperation.TotalBytesToReceiveHex)
Debug.Print TotalBytes
cTB = CCur("&H" & DownloadOperation.TotalBytesToReceiveHex)
Debug.Print cTB
End Sub
So either use "Abs" and an integer variable if you don't expect the data to be large, or use currency if the size might exceed the integer limit to convert from Hexadecimal.
AntView - The MS Edge WebView2 ActiveX control Date last changed: 09/25/2024