Contents
- Index - Top
Using 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 string variant.
Events that address this limitation:
AntView interface
AntViewFrame interface
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.
For VB6 we have included the following ready to run examples:
- Web Browser example - Classic example on how-to load a URL into the browser component, including how-to load local html files via a URL in a way that the local file restrictions via CORS are not applied. Retrieve cookies for the currently loaded page in an asynchronous (event based) way. Print the current document to a pdf file.
- Cookie example (synchronous) - Manipulate and query cookies using a procedural API.
- Load Html as string example - Load the html from a string instead of from a URL or file.
- New Window handling example - Explores the various ways in which you can open a URL into a new page.
- Fill Form example - Using the document interface to set and get data in and out of a html form. Also shows a basic example on how-to execute javascript in the loaded document.
- Fill Form example (synchronous) - The same as the Fill Form example, but now using the alternative procedural API.
- Exchange rates example - An advanced example that executes javascript into the currently loaded document to access an external JSON API for getting the current currency exchange rate for a selected number of currencies. This example then waits for the returned data and shows you today's value of the entered amounts.
- Basic Authentication example - Access password protected websites using Basic Authentication.
- Web message example - Efficiently exchange data between your VB6 application and the html page hosted in the AntView control using standard html5 web messages.
- Custom context menu example - Use custom right click menus in your html page.
- DPI Aware applications - Control the scaling of the html rendered within the control. This is useful when you want the content in the control to be the same regardless of the DPI settings on the computer of the end user.
AntView - The MS Edge WebView2 ActiveX control
Date last changed: 2026/07/13