Page 2 of 2
Re: AeroShot (PB-Edition)
Posted: Sun Nov 20, 2022 7:56 am
by Denis
Hi chi,
nice tools
It works correctly under Win11 x64
II have captured console windows from Visual Studio 2022 without any problem.
Re: AeroShot (PB-Edition)
Posted: Sun Nov 20, 2022 8:45 am
by chi
BarryG wrote: Sun Nov 20, 2022 7:15 am
Nice code, but it forces the target window to the foreground. Is there a way to do it without that and keep the Aero theme? Having big windows stealing the focus is not good.
Hi BarryG, I'm afraid that's not possible with the current implementation. What exactly is the problem with forcing the window in the foreground? After all it's only for a screenshot
Denis wrote: Sun Nov 20, 2022 7:56 am
Hi chi,
nice tools
It works correctly under Win11 x64
II have captured console windows from Visual Studio 2022 without any problem.
Thanks for testing, Denis! Don't forget that you' ll probably need to set a larger margin on Win11 to capture the entire shadow plane of the window.
Re: AeroShot (PB-Edition)
Posted: Sun Nov 20, 2022 8:59 am
by BarryG
It steals the keyboard focus when taking background shots, which isn't good. But I understand that it's a technical limitation.
Re: AeroShot (PB-Edition)
Posted: Sun Nov 20, 2022 10:15 am
by Denis
Thanks for testing, Denis! Don't forget that you' ll probably need to set a larger margin on Win11 to capture the entire shadow plane of the window.
I set margin to 1.
Trying with default margin, the shadow looks like that (completely black, no shadow):

Re: AeroShot (PB-Edition)
Posted: Sun Nov 20, 2022 11:30 am
by chi
Denis wrote: Sun Nov 20, 2022 10:15 am
Thanks for testing, Denis! Don't forget that you' ll probably need to set a larger margin on Win11 to capture the entire shadow plane of the window.
I set margin to 1.
Trying with default margin, the shadow looks like that (completely black, no shadow):
It seems that SetClipboardImage doesn't work with 32bit images anymore (on Win11)... Use: Capture to File with 80px margin
BarryG wrote: Sun Nov 20, 2022 8:59 am
It steals the keyboard focus when taking background shots, which isn't good. But I understand that it's a technical limitation.
Yup, it's a limitation... Unless you're somehow able to take two screenshots, one with a black and one with a white background, from a (partially) hidden Window with overflow (margin)

Re: AeroShot (PB-Edition)
Posted: Sun Nov 20, 2022 1:23 pm
by Denis
With a bigger margin, it's the same.
with a black or white background, it's the same.
Displaying partially on a black and on a white background, it's the same.
Re: AeroShot (PB-Edition)
Posted: Sun Nov 20, 2022 9:48 pm
by chi
Denis wrote: Sun Nov 20, 2022 1:23 pm
With a bigger margin, it's the same.
with a black or white background, it's the same.
Displaying partially on a black and on a white background, it's the same.
The part with the black/white background wasn't meant for you

. This is how the program works in general. You take a 32bit screenshot of the window + margin with a white and a black background and calculate the alpha channel.
Like I said, capturing to the clipboard on Win11 seems broken, but capturing to a png file with 80px margin should give you something like this:

If both "Clipboard" and "File" captures are completely black in the background, then something is going wrong under Win11...
Re: AeroShot (PB-Edition)
Posted: Mon Nov 21, 2022 6:12 am
by Denis
chi,
with a png file its Ok.
May be function PB SetClipboardImage() isn't correct with AlphaBlended image.
If you get time, you can try with API and give us result.