DonationCoder.com forum
 
Read-only archive. This is a static copy of the DonationCoder.com forum. Reading and searching work as before; logging in, posting and private messages do not.
Archive of 2026-10-21 · About this archive · Main site

Author Topic: Capturing borders on dialog boxes on Windows 7  (Read 7,392 times)

bsdll

  • Participant
  • Joined in 2015
  • *
  • Posts: 4
Capturing borders on dialog boxes on Windows 7
« on: August 10, 2015, 04:01 AM »
Hi,

I have a problem capturing the borders on dialog boxes on Windows 7. Aero theme (I tried another theme to add square borders hoping that would fix the problem, but had no impact).

The attached image shows the problem.

The top part is the actual dialog box.

The second part is the result of capturing a Windows Object. I have drawn a black border around the captured area (it is padded with white space).

Windows Snipping Tool and all other tools I have tried have the same problem when capturing the dialog box, I was hoping that there would be a setting that would work in the options, but none of the Aero sttings I tried helped.

Thanks.

Ath

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 3,649
    • Participated in NANY Challenge Eleven Times
    • Coding Snacks
    • Linux User
    • Hardware Hacker
Re: Capturing borders on dialog boxes on Windows 7
« Reply #1 on: August 10, 2015, 07:49 AM »
This looks like an owner-drawn or custom message-box, created from a Borland based dev. environment, probably a quite old one. I can see no shadow-border around the window.
The only way I see how to come near to your desired outcome is to start with a Region capture, select the usual/desired visible part, and blur outside of the selection. That's not ideal, I get that, but imho a workable solution.
/Ton
Ath's software collection, Quote: "A problem well stated is a problem half-solved." (Charles Kettering)

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,931
    • Gathering Badge
    • Plugin Coding Medal
    • Participated in NANY Challenge Seventeen Times
    • Cody Award
    • Coding Snacks
    • Volunteers/Staff
Re: Capturing borders on dialog boxes on Windows 7
« Reply #2 on: August 10, 2015, 07:56 AM »
i would have thought that one of the active-window capture modes should be smart enough to not do that cropping.

bsdll

  • Participant
  • Joined in 2015
  • *
  • Posts: 4
Re: Capturing borders on dialog boxes on Windows 7
« Reply #3 on: August 10, 2015, 08:03 AM »
Good call on the Delphi part, it's not owner drawn though, it's just the normal dialog with pictures on the buttons (but I did have a Windows theme on for the square borders).

Here is a shot from Excel 2010, back on the default Aero template of Windows, with the same behaviour.

I can't take a screenshot, but when the red selection box comes up for a "Windows object" it is inside the frame already, so it's not even considering the edge of the dialog box as something worth taking a photo of.

One thing I am wondering if SC can do - can you take an image using the region that's bigger than the dialog box, and then have SC automatically trim out the whitespace until it hits the borders, and then save only that as the screenshot? I always take the shot on white. That would work around the problem.

Currently what I have to do is capture the bigger area, go into paint, move the item to the corner and shrink the right hand side, which is a lot of work for hundreds of screenshots.

Thanks.

bsdll

  • Participant
  • Joined in 2015
  • *
  • Posts: 4
Re: Capturing borders on dialog boxes on Windows 7
« Reply #4 on: August 10, 2015, 08:06 AM »
This is what you get with active window capture.

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,931
    • Gathering Badge
    • Plugin Coding Medal
    • Participated in NANY Challenge Seventeen Times
    • Cody Award
    • Coding Snacks
    • Volunteers/Staff
Re: Capturing borders on dialog boxes on Windows 7
« Reply #5 on: August 10, 2015, 08:29 AM »
right ok so your last image helps answer:
Quote
One thing I am wondering if SC can do - can you take an image using the region that's bigger than the dialog box, and then have SC automatically trim out the whitespace until it hits the borders, and then save only that as the screenshot? I always take the shot on white. That would work around the problem.

sc will do exactly this -- but what you are seeing is a side effect of CHILD windows on top of their parents -- this messes up SC's attempt to capture background transparency.

so the trick in such cases is to move that modal child window off of the main parent window before capture.

assuming you are following my logic, give that a try and let me know how it works.

bsdll

  • Participant
  • Joined in 2015
  • *
  • Posts: 4
Re: Capturing borders on dialog boxes on Windows 7
« Reply #6 on: August 10, 2015, 08:43 AM »
Fantastic.

I have gone to a non-Aero theme with square borders and using the Active window works for the dialog boxes. With the standard Aero theme on it still takes a picture bigger and keeps the faded out edges, which I don't want.

For all other windows I can use the Windows object capture and that works.

Much appreciated for your help.  :) :)

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,931
    • Gathering Badge
    • Plugin Coding Medal
    • Participated in NANY Challenge Seventeen Times
    • Cody Award
    • Coding Snacks
    • Volunteers/Staff
Re: Capturing borders on dialog boxes on Windows 7
« Reply #7 on: August 10, 2015, 11:49 AM »
Great  :up:

Original address: https://www.donationcoder.com/forum/index.php?topic=41413.0