Capturing screenshot of a window

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/
 
N

Nayan

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!
 
L

Larry Lard

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.
 
G

Gabriel Lozano-Morán

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
 
N

Nayan

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
 
N

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
 
G

Gabriel Lozano-Morán

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
 
G

Gabriel Lozano-Morán

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
 
N

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
 
G

Gabriel Lozano-Morán

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top