WebView2 for VB6 — Commercial ActiveX OCX
Also works in VBA (Excel, Access, Word, Outlook), VB.NET, C#, C++, Delphi, Python, PowerShell — and any COM host.
LiteView2 is a commercial 32-bit ActiveX OCX that embeds Chromium WebView2 inside Visual Basic 6 applications. Microsoft has no current plans for a WebView2 control for VB6. LiteView2 ships a commercially supported x86 OCX — registered or registration-free deployment, hundreds of documented methods, dozens of documented events.
30-day commercial trial · 32-bit x86 OCX included · No admin required (reg-free mode)
"There's no official support of VB6 for WebView2." — Answer on Microsoft Q&A, question 727127 (February 2022)
"Need webview2.ocx for vb6,vc++6,delphi,vba(excel,access),foxpro" — WebView2Feedback #1392, a user request. Microsoft closed it as “not planned” in June 2023: “We don't have current plans in this area.”
Why VB6 developers need this
The legacy WebBrowser control built into VB6 via shdocvw.dll runs on the Internet Explorer 11 engine (MSHTML). Microsoft retired the Internet Explorer 11 desktop application on June 15, 2022, on certain versions of Windows 10, and recommends WebView2 for new development. Many modern websites no longer support the IE engine. The gap — a supported, production-ready Chromium browser for VB6 — has no official Microsoft solution. LiteView2 fills it.
What you get
VB6 code sample
Registered Mode (after the LiteView2 installer has registered the control) — drop the control on a form and wire events:
' In a VB6 Form module
Private WithEvents m_lv As LiteView2Lib.LiteView2Ctrl
Private Sub Form_Load()
Set m_lv = LiteView2Ctrl1.Object
End Sub
Private Sub m_lv_WebViewReady()
m_lv.SetLocalContentRoot App.Path & "\html"
m_lv.Navigate "https://lv2.example/dashboard.html"
End Sub
Private Sub m_lv_NavigationCompleted(ByVal url As String, ByVal success As Boolean)
' Page loaded — safe to push data or execute script
m_lv.ExecuteScript "updateStatus('VB6 connected')"
End Sub
Private Sub m_lv_WebMessageReceived(ByVal message As String, ByVal source As String)
' Receive data from JavaScript
Debug.Print "From JS: " & message
End SubReg-Free Mode — no registration, no admin rights, OCX travels with your .exe:
' modLV2Pool - add this standard module to the project once.
Option Explicit
Private Declare Function SetDllDirectory Lib "kernel32" _
Alias "SetDllDirectoryW" (ByVal lpPathName As Long) As Long
Private Declare Function LiteView2_ActivateManifest _
Lib "LiteView2_x86.ocx" (ByVal path As Long) As Long
Private Declare Function LiteView2_CreateBrowserPool _
Lib "LiteView2_x86.ocx" () As Object
Private m_Pool As Object
Public Function GetPool() As Object
If m_Pool Is Nothing Then
' Load the OCX from the app folder (the .vbp folder when run in the IDE).
SetDllDirectory StrPtr(App.Path)
LiteView2_ActivateManifest StrPtr(App.Path & "\LiteView2_x86.ocx")
Set m_Pool = LiteView2_CreateBrowserPool()
End If
Set GetPool = m_Pool
End Function
' Form1 - a Frame named Frame1 marks where the browser appears.
Option Explicit
Private idx As Long
Private Sub Form_Load()
' Create the browser inside the Frame's window (position and size in pixels).
idx = GetPool().Create(Frame1.hWnd, "about:blank", 0, 0, _
ScaleX(Frame1.Width, vbTwips, vbPixels), ScaleY(Frame1.Height, vbTwips, vbPixels))
GetPool().SetReadyCallback idx, Me, "OnBrowserReady"
End Sub
Public Sub OnBrowserReady()
GetPool().SetLocalContentRoot idx, App.Path & "\html"
GetPool().Navigate idx, "https://lv2.example/dashboard.html"
End Sub
Private Sub Form_Unload(Cancel As Integer)
If idx > 0 Then GetPool().DestroySync idx
End SubDeployment
Registered Mode: On your development PC, the LiteView2 installer registers the 32-bit and 64-bit controls (administrator approval required). Drop the LiteView2Ctrl from the Toolbox onto your VB6 form at design time. Each target machine needs the same one-time step: run the LiteView2 installer there (administrator approval required).
Reg-Free Mode: Copy LiteView2_x86.ocx next to your compiled .exe. Call LiteView2_ActivateManifest at startup. No admin rights required on any target machine — the OCX travels with your application like any other DLL.
WebView2 Runtime: Windows 11 includes it, and Microsoft has installed it on all eligible Windows 10 devices. Where it is missing, install Microsoft’s Evergreen WebView2 Runtime.
Frequently asked questions
Is there a WebView2 control for Visual Basic 6?
An answer on Microsoft Q&A (question 727127, February 2022) says: “There’s no official support of VB6 for WebView2.” LiteView2 is a commercially supported 32-bit ActiveX OCX that wraps WebView2 for VB6, with registered or registration-free deployment, hundreds of documented methods and dozens of documented events.
Does LiteView2 work with 32-bit VB6?
Yes. VB6 is always 32-bit, so use LiteView2_x86.ocx. It works in the VB6 IDE and in compiled executables, in Registered Mode and in Reg-Free Mode.
Can I use reg-free deployment in VB6?
Yes. Copy LiteView2_x86.ocx next to your application’s executable, call LiteView2_ActivateManifest from a VB6 module, then create the browser pool with LiteView2_CreateBrowserPool. No regsvr32, no admin rights, no COM registration. The OCX file travels with your application.
What happened to the legacy WebBrowser control in VB6?
It still loads and runs on the Internet Explorer 11 engine (MSHTML), which Microsoft still supports; for new development Microsoft recommends WebView2. Many modern websites no longer support the IE engine. LiteView2 brings WebView2 to VB6.
What does the commercial license cover?
Redistribution with your application under written license terms, royalty-free at every tier, and direct support from the developer. Community WebView2 projects for VB6 also exist; check each project’s license and status before you ship it.
Modern Chromium in VB6 — starting today
32-bit x86 OCX included. Registered or reg-free. Hundreds of documented methods. Free 30-day trial.
Download free 30-day trial30-day commercial trial · No telemetry · 32-bit and 64-bit OCX included
WebView2 ActiveX — all COM hosts · Replace the WebBrowser Control · Reg-free deployment · Pricing