Google Chrome Pages as files

Google Chrome Pages as files

Postby Natter » Thu Apr 21, 2022 2:42 pm

Hi,

I save application windows and browser pages to files using the Save Window() function. If these are windows of any application or pages of FireFox, IE browsers, everything is fine. But if these are Google Chrome browser pages, I get files with a black square. What could be the reason ?
Natter
 
Posts: 1203
Joined: Mon May 14, 2007 9:49 am

Re: Google Chrome Pages as files

Postby karinha » Thu Apr 21, 2022 3:01 pm

Show via code how you are doing. It's easier to help.

Regards, saludos.
João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
User avatar
karinha
 
Posts: 7789
Joined: Tue Dec 20, 2005 7:36 pm
Location: São Paulo - Brasil

Re: Google Chrome Pages as files

Postby Natter » Fri Apr 22, 2022 5:59 am

The code is simple:
1. Through EnumChildWindows() I get a list of handles of visible windows
2. For each handle I show the window in full screen ShowWindow(hWn, 3) and through SaveWindow(hWn, path+file name, width, height,) I save the DC windows to a file (bmp/jpg/png)
Everything is fine, but it does not work to copy DC to a file from the Google Chrome page :cry:
Natter
 
Posts: 1203
Joined: Mon May 14, 2007 9:49 am

Re: Google Chrome Pages as files

Postby Jimmy » Fri Apr 22, 2022 7:11 am

hi,

i have similar Problem when try to make "Snapshot" of running Video

but you always can use
Code: Select all  Expand view
SENDKEY( VK_SNAPSHOT ) 

than i can get Bitmap in Clipboard and "DrawDCtoDC" it to new empty Bitmap

under HMG i use "Bos Taurus", not sure how to o it with FiveWin
greeting,
Jimmy
User avatar
Jimmy
 
Posts: 1725
Joined: Thu Sep 05, 2019 5:32 am
Location: Hamburg, Germany

Re: Google Chrome Pages as files

Postby Natter » Fri Apr 22, 2022 7:34 am

Simulate a Print screen, and then save the Clipboard to a file... This, however, is not very convenient because you will have to pull the windows to the foreground. But can do that. Thank you, Jimmy !
Natter
 
Posts: 1203
Joined: Mon May 14, 2007 9:49 am


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 89 guests