Contents - Index - Top


UserAgent

Interface AntView 

 

Type: Property

Access: Read/Write

Data Type: String

 

 

Used to set or get the User Agent string for the AntView control. 

By default it will use the Microsoft MS Edge browser user agent.

 

Example in Visual Basic:

 

Private Sub EdgeWebBrowser_OnCreateWebviewCompleted(ByVal HResult As Long)

  EdgeWebBrowser.UserAgent = "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:96.0) Gecko/20100101 Firefox/96.0"

End Sub

 

Note that there is some peculiar behavior in WebView2 when setting the User Agent for initial navigation. A discussion about this can be found here:WebView2 Feedback issue 2862 Setting UserAgent not effective on first navigation.

 .

 

Setting the property is always only applied for the next navigation.

 


AntView - The MS Edge WebView2 ActiveX control Date last changed: 2026/07/13