Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

How can I make a screenshot when a window is minimized?

Posted on 2015-01-03
8
Medium Priority
?
379 Views
Last Modified: 2015-01-24
Hello,

Could somebody tell me how I can make a screenshot from a minimized window?
I've found a few solution, but these doesn't work properly:
http://www.codeproject.com/Articles/20651/Capturing-Minimized-Window-A-Kid-s-Trick
http://stackoverflow.com/questions/27024554/capture-screenshot-from-selected-minimized-window

Thank you in advance for your answer!
0
Comment
Question by:ForExpert
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
8 Comments
 
LVL 38

Expert Comment

by:Gerwin Jansen, EE MVE
ID: 40530330
By definition, you can't do that as there is nothing on screen. Screens on a Windows desktop are only updated when they are (partly) visible. What is it you expect to get from a screen that is not visible? Is it a specific application that you want info from?
0
 
LVL 55

Expert Comment

by:Joe Winograd, EE MVE 2015&2016
ID: 40530340
I don't fully understand your requirement. Since you posted in the Topics of Miscellaneous Programming and Microsoft Development, I presume you want some code to do this. If so, in what language? Or do you want a stand-alone executable? In any case, are you OK with a solution that restores or maximizes the window, takes the screenshot, and then minimizes the window again? Also, what do you want to do with the screenshot? Leave it on the clipboard? Save it to an image file? If so, what file type — BMP, GIF, JPG, PNG, etc.? Regards, Joe
0
 
LVL 86

Expert Comment

by:Mike Tomlinson
ID: 40532596
How do the links you posted "not work properly"?...without details on what you're doing and the results you're getting, we can't be of much help.
0
The top UI technologies you need to be aware of

An important part of the job as a front-end developer is to stay up to date and in contact with new tools, trends and workflows. That’s why you cannot miss this upcoming webinar to explore the latest trends in UI technologies!

 
LVL 31

Expert Comment

by:Helen Feddema
ID: 40535891
First you have to open the app, either restored or maximized, before you can capture a screen shot of it.  What programming language are you using?
0
 

Author Comment

by:ForExpert
ID: 40538887
Thank you for your answers!

I'd like to "track" a flash application in a browser in the background, because I'd like to work on the same computer too. So I start the browser and the application in a window and I make it minimized, because if a window always restored and minimized then the work will be impossible on the same computer.

I use Delphi, but the solution needs WinAPI, so if you could provid a C++ solution it would be almost the same. I can port it under Delphi.

I save and analyze the screenshot as a BMP file in the memory.

Please check the links, and you'll see their results. These solutions works when a windows in a background (so not in the front), but doesn't work when the window is minimized, Theoretically the codeproject solution works with minimzed windows also, but I tried it and it didn't work for me. The solution uses a PrintWindow WinAPI which uses WM_PRINT/WM_PRINTCLIENT messages to get the screenshot (and it restores the window as a transparent window and later make it back to minimized?).
0
 
LVL 38

Expert Comment

by:Gerwin Jansen, EE MVE
ID: 40539027
>> but doesn't work when the window is minimized
I believe this is correct, the windows functionality of the Microsoft operating system is that once a window is on screen, the parts that are visible to the user must be 'drawn' or refreshed to show their contents. You can by some trick apparantly force a window to redraw its contents when it's behind another window and then use WM_PRINT to get that (hidden) content. But when the window is minimized (0px high 0px wide) then there just is nothing to draw or get a screenshot of. So if you can explain that part about "Theoretically the codeproject solution works with minimzed windows also" then I'd be interested :) Only way I can think of is how to do this is a virtual desktop (or a physical second display) that has the window you want captured being displayed (not minimized). There are several virtual desktops applications out the for Windows like VirtuaWin or Dexpot that you could try.
0
 

Accepted Solution

by:
ForExpert earned 0 total points
ID: 40557357
Codeproject solution works perfectly with normal windows under Windows. Please take a little time to test it. But I wanted to use this solution with flash applications also which run in a browser window. The problem was with this.
0
 

Author Closing Comment

by:ForExpert
ID: 40567971
I haven't received any working solution, but which I referred partly works.
0

Featured Post

Build and deliver software with DevOps

A digital transformation requires faster time to market, shorter software development lifecycles, and the ability to adapt rapidly to changing customer demands. DevOps provides the solution.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Computer science students often experience many of the same frustrations when going through their engineering courses. This article presents seven tips I found useful when completing a bachelors and masters degree in computing which I believe may he…
If you are a mobile app developer and especially develop hybrid mobile apps then these 4 mistakes you must avoid for hybrid app development to be the more genuine app developer.
An introduction to basic programming syntax in Java by creating a simple program. Viewers can follow the tutorial as they create their first class in Java. Definitions and explanations about each element are given to help prepare viewers for future …
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…

704 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question