Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Getting hwnd of Control
#4
(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
and that did print the contents of the video in the Pdf.

Not sure if that helps you though.
--
Wil
Reply


Messages In This Thread
Getting hwnd of Control - by maddire - 2022-06-21, 13:03:40
RE: Getting hwnd of Control - by wila - 2022-06-21, 16:56:51
RE: Getting hwnd of Control - by maddire - 2022-06-21, 19:06:41
RE: Getting hwnd of Control - by wila - 2022-06-22, 10:23:34

Forum Jump:


Users browsing this thread: 1 Guest(s)