Use AntView in Visual Basic 6
There are some specific notes on using AntView for Visual Basic.
As Visual Basic does not natively support Int64 data types, there are workarounds available when the WebView2 control returns a variable that is of data type Int64.
Since we can't just cut off the data to fit in Int32, we instead encode the data as hexadecimal and pass that as a string.
Below is a summary of the VB6 specific features.
There are more details on the linked documentation as well as in the Visual Basic examples that come pre-installed.
You will want to set a property called EventsUseHexadecimal to switch the relevant events to using the hexadecimal variant.
Events that address this limitation:
Some data structures such as AntViewDownloadOperation offer the data as Int64 as well as in hexadecimal format.
The hexadecimal variant has a "Hex" suffix.
For example TotalBytesToReceiveHex
For the properties PreviousFocusWindowHandle and NextFocusWindowHandle that both take a 64 bit handle there are 32 bit alternatives called PreviousFocusWindowHandleUInt and NextFocusWindowHandleUInt.
For the AntViewDocument.CurrentBrowser property to link the document interface to the browser control, there's also an alternative for VB6.
Trying to use the CurrentBrowser property in VB6 will throw an "interface not supported" error, so instead you should use the BrowserDispatch method to setup the connection using the IDispatchPointer property from the AntView Control.
For BrowserProcessID there's the BrowserProcessIDLong variant as VB6 has problems with the Unsigned Long data type.
AntView - The MS Edge WebView2 ActiveX control Date last changed: 09/30/2024