Gdiplus screenshot gets black screen with Chrome only

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
titep
Posts: 31
Joined: 14 Nov 2015, 09:01

Gdiplus screenshot gets black screen with Chrome only

09 May 2019, 02:27

:shock:

That's really weird. I'm using Gdip_BitmapFromHWND to capture Window. Everything goes well except for Chrome.

Is there anybody encounter this problem?

Code: Select all

MouseGetPos,,, MouseWin
pImage := Gdip_BitmapFromHWND(MouseWin)
Thanks
sixzeros
Posts: 7
Joined: 07 Oct 2015, 01:59

Re: Gdiplus screenshot gets black screen with Chrome only

13 Jul 2019, 20:45

For others getting this problem on win10 . try modifying the PrintWindow function in Gdip_all.ahk to add the RENDERFULLCONTENT flag.

Code: Select all

PrintWindow(hwnd, hdc, Flags=0)
{
	Ptr := A_PtrSize ? "UPtr" : "UInt"
	Flags |= 2	
	;PW_RENDERFULLCONTENT = $00000002
	return DllCall("PrintWindow", Ptr, hwnd, Ptr, hdc, "uint", Flags)
}
User avatar
jeeswg
Posts: 6902
Joined: 19 Dec 2016, 01:58
Location: UK

Re: Gdiplus screenshot gets black screen with Chrome only

13 Jul 2019, 21:11

Interesting, thanks for sharing.

Something else that may be relevant:
TransColor doesn't work in Chrome - AutoHotkey Community
https://autohotkey.com/boards/viewtopic.php?f=5&t=60957&p=280208#p280208
Uncheck “Use hardware acceleration when available”.
homepage | tutorials | wish list | fun threads | donate
WARNING: copy your posts/messages before hitting Submit as you may lose them due to CAPTCHA

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: CuriousDad, rc76 and 235 guests