2022-09-13, 22:20:57
Hi,
Today I played a bit with MS Access. Only have a very old version here, but I suspect that that isn't the main issue.
I could not reproduce what you're seeing, but it did behave a bit wacky.
This is the code I ended up with that seems to behave reasonably.
So only resizing after the control has actually been created.
Sending a resize immediately after a create and using InsideWidth and InsideHeight.
Oh and I also had to turn off AutoSize (whatever that does)
I'm setting EventsUseHexadecimal there as that's a setting I expect you will need in order to be able to use several of the events.
Hope this helps,
--
Wil
Today I played a bit with MS Access. Only have a very old version here, but I suspect that that isn't the main issue.
I could not reproduce what you're seeing, but it did behave a bit wacky.
This is the code I ended up with that seems to behave reasonably.
Code:
Option Compare Database
Private WithEvents Document As AntViewAx.AntViewDocument
Private Sub Document_OnRequestCurrentHtml(ByVal Html As String)
MsgBox Html
End Sub
Private Sub EdgeWebBrowser_OnCreateWebviewCompleted(ByVal HResult As Long)
If HResult = 0 Then
Form_Resize
End If
End Sub
Private Sub Form_Load()
Set Document = CreateObject("AntViewAx.AntViewDocument")
EdgeWebBrowser.CreateWebView
EdgeWebBrowser.Navigate "https://docs.microsoft.com/en-us/dotnet/api/microsoft.web.webview2.core"
EdgeWebBrowser.AutoSize = False
EdgeWebBrowser.EventsUseHexadecimal = True
End Sub
Private Sub Form_Resize()
On Error Resume Next
If EdgeWebBrowser.WebViewCreated = True Then
EdgeWebBrowser.Width = Me.InsideWidth - 500
EdgeWebBrowser.Height = Me.InsideHeight - 700 - GetHtmlButton.Height
End If
End Sub
Private Sub GetHtmlButton_Click()
Document.CurrentBrowser = Me.EdgeWebBrowser.Object
Document.RequestCurrentHtml
End Sub
Sending a resize immediately after a create and using InsideWidth and InsideHeight.
Oh and I also had to turn off AutoSize (whatever that does)
I'm setting EventsUseHexadecimal there as that's a setting I expect you will need in order to be able to use several of the events.
Hope this helps,
--
Wil