UnlockControl
Interface AntView and AntViewGlobal
Type: Method
Parameters: String Company String LicenseCode
Returns: nothing
Use the UnlockControl method to unlock the license for the AntView control so that you can use it in your applications.
Provide the company name and license code exactly like it has been provided to you after you bought the control.
The unlock logic has to be done in your code, it does not save the unlock status at computer level.
Unlocking is done at application level.
After the control is instantiated, it needs to be unlocked, before you use it to display content or navigate to a URL.
This must be done for each AntView object instance in your application.
You can unlock the license via the UnlockControl method for the AntView control or via the AntViewGlobal object instance for all your AntView controls in your application.
Example code in Visual Basic:
Private Sub Form_Load()
Dim LicenseText As String
Dim Days As Integer
Dim eStatus As TxUnlockStatus
On Error Resume Next
Me.Show
tbToolBar.Refresh
Form_Resize
LicenseText = "AntView License Status = "
EdgeWebBrowser.UnlockControl "ExampleCompany", "WI5PO2-2KSU3Q-HWFXFU-IUMU2V-QF8P2F"
eStatus = EdgeWebBrowser.UnlockStatus
If (eStatus = usLicensed) Then
LicenseText = LicenseText & "Licensed"
End If
If (eStatus = usDemoLicense) Then
Days = EdgeWebBrowser.DemoDaysLeft
LicenseText = LicenseText & "Demo with " & (CStr(Days)) & " Days Left."
End If
If (eStatus = usUnlicensed) Then
LicenseText = LicenseText & "Expired demo license."
End If
InfoText.Text = LicenseText
EdgeWebBrowser.CreateWebView
EdgeWebBrowser.EventsUseHexadecimal = True ' For VB we need to use the Hexadecimal event variants
If Len(StartingAddress) > 0 Then
cboAddress.Text = StartingAddress
cboAddress.AddItem cboAddress.Text
'try to navigate to the starting address
EdgeWebBrowser.Navigate StartingAddress
End If
End Sub
Note that even if your subscription for support can expire, the license itself does not expire.
The license is valid for all versions of AntView released during your active subscription period.
If you let your subscription expire then you can not unlock versions of AntView released after your license expired.
We recommend you to keep the support subscription active so that a breaking change in the WebView2 API gives you quick access to fixes in AntView. An active subscription also gives you access to any new features that are released.
See also: UnlockStatus, DemoDaysLeft, Embedded License File
AntView - The MS Edge WebView2 ActiveX control Date last changed: 04/16/2025