2022-06-21, 13:03:40
2022-06-21, 16:56:51
Hi,
Not at the moment. At least there's no officially supported way to do that.
Out of curiosity, can you tell me why you want to have the window handle to the browser control?
FWIW, I opened a ticket on your behalf to look into this.
--
Wil
Not at the moment. At least there's no officially supported way to do that.
Out of curiosity, can you tell me why you want to have the window handle to the browser control?
FWIW, I opened a ticket on your behalf to look into this.
--
Wil
2022-06-21, 19:06:41
I was trying to capture a screenshot of the control and needed it’s hwnd. I did try winspy to get its hwnd but it produced a blank image. Must be limitations of edge itself as i know capturing a canvas image of a https video is near impossible.
2022-06-22, 10:23:34
(2022-06-21, 19:06:41)maddire Wrote: [ -> ]I was trying to capture a screenshot of the control and needed it’s hwnd. I did try winspy to get its hwnd but it produced a blank image. Must be limitations of edge itself as i know capturing a canvas image of a https video is near impossible.
One way that at least seems to give some results is to print to Pdf.
eg. I added a button and then called this:
Code:
Private Sub PrintCurrentDocument()
Dim FilePath As String
Dim Settings As String
FilePath = "" ' Not specifying a path+filename will popup a file save as dialog
Settings = "" ' JSON serialized string with options for settings
' We're going to add the following JSON:
' { "displayHeaderFooter" : true,
' "headerTitle" : "AntView PrintToPdf Demo",
' "printBackground" : true,
' "scale" : 0.5
' }
Settings = "{"
Settings = Settings & " ""displayHeaderFooter"": true, "
Settings = Settings & " ""headerTitle"": ""AntView PrintToPdf Demo"", "
Settings = Settings & " ""printBackground"": true, "
Settings = Settings & " ""scale"": 0.5 "
Settings = Settings & "}"
EdgeWebBrowser.PrintToPdf FilePath, Settings
End Sub
Not sure if that helps you though.
--
Wil