Capturing screenshot of a window

  • Thread starter Thread starter Nayan
  • Start date Start date
N

Nayan

Hi,

Can anyone suggest working sample of capturing a window's picture?
I tried a few, but couldn't get the image. I don't know why those
functions are not getting the image.

Note: I want the snapshot of the window even when it's not visible.
And, I work in "C#".

An example: http://www.developerfusion.co.uk/show/4630/
 
Another source-
http://www.codeproject.com/csharp/screen_capturing.asp

I think, the problem is that if the window is minimized or off the
screen, or if it is on another desktop which is not active (visible),
then the screen shot is not correct. Either its screenshot of the
active window or it is black bar.


Can anyone advise how to take correct screen shot even if the window is
not the active and foremost one?

Thanks a million!
 
Nayan said:
Hi,

Can anyone suggest working sample of capturing a window's picture?
I tried a few, but couldn't get the image. I don't know why those
functions are not getting the image.

Note: I want the snapshot of the window even when it's not visible.

When the window isn't visible, its image doesn't really exist. See
<http://blogs.msdn.com/oldnewthing/archive/2005/06/24/432229.aspx> for
more info; the information there might be at a lower level than you
like, though.
 
I wonder if this is still true in Windows Vista since it is possible to show
thumbnail views of the application in the taskbar even if the application is
minimized.

Gabriel Lozano-Morán
The .NET Aficionado
http://www.pointerx.net
 
Yes,, since its possible to see the thumbnail (I remember that
"Powertoys for Windows XP" can do the same on XP), is there a way in
XP?

Thanks!
Nayan
 
This is great.. but I am working in XP.

Just to get the image of app, i won't like to install Vista :-/

Any help.. please?

Thanks a bunch!
Nayan
 
I am sorry that I can't help you but here is another nice example of what
you are looking for:
http://www.visualtasktips.com/

Gabriel

Yes,, since its possible to see the thumbnail (I remember that
"Powertoys for Windows XP" can do the same on XP), is there a way in
XP?

Thanks!
Nayan
 
To be honest I don't think that it is possible in Windows XP with minimized
windows.

Gabriel

Yes,, since its possible to see the thumbnail (I remember that
"Powertoys for Windows XP" can do the same on XP), is there a way in
XP?

Thanks!
Nayan
 
Thanks a lot, Gabriel!

I think, I should put the window in front, take a shot and restore back
to its state :)

But if i put the window out of visible area of the screen (the window
is still in front) can i capture the window correctly ?

Thx
Nayan
 
You should propably ask these questions on the dotnet graphics newsgroups.
Bob Powell knows a lot more about this stuff and he is primarily active on
that newsgroup.

Gabriel

Thanks a lot, Gabriel!

I think, I should put the window in front, take a shot and restore back
to its state :)

But if i put the window out of visible area of the screen (the window
is still in front) can i capture the window correctly ?

Thx
Nayan
 
Back
Top