Contents - Index - Top


UnlockStatus

Interface AntView 

 

Type: Method

Parameters: none

Returns: TxUnlockStatus

 

 

This function returns the current UnlockStatus of the control and is provided so you can determine if the control is properly licensed via the UnlockControl method.

 

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

 

 

See also: UnlockControl, DemoDaysLeft

 


AntView - The MS Edge WebView2 ActiveX control Date last changed: 04/16/2025