Okey. Here’s what I want to do:
I have a windows application that sorts a folder specified by the user. I want to take a screenshot of this folder before sorting, and then again when my program has finished sorting the folder.
I know how to take a screenshot of an active window using the following link:
Capture screenshot of active window?
However, what happens if I want to take screenshot of an unopened location?
Meening, that I want to take a screenshot of a folder that is not opened at all. Is it even possible?
If yes, then how would I go about achieving this?
One way I guess would be to make the program open the folder -> take screenshot -> close it -> sort folder -> open folder -> take new screenshot -> Show on screen
This isn’t a very elegant solution though.
Can anyone shed some light on this issue? Thank you for your time!
First think of the purpose of the screenshot. You might be able to log the order of objects inside the folder before and after sorting them. Then you can use your logdata to produce an textual or graphical output showing a folder like image with the contents in presorted order.
If you take a screenshot how do you handle objects that do not fit inside the folder? With the above solution you will get information even of files not visible in an open folder.
Otherwise there will be no way to get a real screenshot of anything that is not on the screen. Opening the folder would be the easiest and only way then.