Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
VB6: UserDataFolder and UserAgent are ignored
#3
Dear Wil.

Thank you for your detailed explanation.
I followed your comments and it seems that now (private build: 1.1.150.0) "AntView.UserDataFolder" works as expected.

Back to the second case (UserAgent) I made a minor correction to your code.

This example works correctly

Code:
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

When using this code, the WebBrowser still takes the default value from user system/Edge browser

Code:
Private Sub EdgeWebBrowser_OnCreate()
EdgeWebBrowser.UserAgent = "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:96.0) Gecko/20100101 Firefox/95.0"
End Sub

In summary, you should set the UserAgent only when "OnCreateWebviewCompleted" event fired
Reply


Messages In This Thread
RE: VB6: UserDataFolder and UserAgent are ignored - by MrPrzemek - 2022-04-19, 08:18:07

Forum Jump:


Users browsing this thread: 1 Guest(s)