By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,195 Members | 1,468 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,195 IT Pros & Developers. It's quick & easy.

Enhancing Bob Powell example

P: n/a
Bob Powell has a code example called "Capturing the screen or the surface of
a control" found here:

http://www.bobpowell.net/capture.htm

I would like to know what in the world do I have to add to this code so that
the surface of the control is also captured even if there is another control
covering it.

Thank you. Please help!!!!!
May 20 '06 #1
Share this Question
Share on Google+
3 Replies


P: n/a
Rene,

I don't believe you can do that, unless you actually hide the control on
top of it. The windows manager knows the z order of the windows, and
doesn't have the window render that part of itself.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Rene" <a@b.c> wrote in message
news:%2****************@TK2MSFTNGP04.phx.gbl...
Bob Powell has a code example called "Capturing the screen or the surface
of a control" found here:

http://www.bobpowell.net/capture.htm

I would like to know what in the world do I have to add to this code so
that the surface of the control is also captured even if there is another
control covering it.

Thank you. Please help!!!!!

May 20 '06 #2

P: n/a
I am looking at the DrawToBitmap() function inplemented by the Control class
and that funciton does return the complete surface even if there are
controls on top of it, how do they do that?

In case you are wondering why I don't use that functino if it already does
what I want is because the stupid Web Browser control has that function but
it does not work and of course the control that I need to snap-shot is a Web
Browser control.

"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard.caspershouse.com> wrote in
message news:OO**************@TK2MSFTNGP05.phx.gbl...
Rene,

I don't believe you can do that, unless you actually hide the control
on top of it. The windows manager knows the z order of the windows, and
doesn't have the window render that part of itself.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Rene" <a@b.c> wrote in message
news:%2****************@TK2MSFTNGP04.phx.gbl...
Bob Powell has a code example called "Capturing the screen or the surface
of a control" found here:

http://www.bobpowell.net/capture.htm

I would like to know what in the world do I have to add to this code so
that the surface of the control is also captured even if there is another
control covering it.

Thank you. Please help!!!!!


May 20 '06 #3

P: n/a
Rene,

It appears that it creates a new bitmap and then gets the device context
for that bitmap. Then, what it does is call SendMessage, passing the handle
to the device context, as well as the WM_PRINT message, which tells the
control to draw itself to the device context.

Check out my response in an earlier thread (way earlier) which shows how
you can get the thumbnail image (of any size) from the WebBrowser control:

http://groups.google.com/group/micro...c571f730e13a25
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Rene" <a@b.c> wrote in message
news:eC**************@TK2MSFTNGP02.phx.gbl...
I am looking at the DrawToBitmap() function inplemented by the Control
class and that funciton does return the complete surface even if there are
controls on top of it, how do they do that?

In case you are wondering why I don't use that functino if it already does
what I want is because the stupid Web Browser control has that function
but it does not work and of course the control that I need to snap-shot is
a Web Browser control.

"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard.caspershouse.com> wrote
in message news:OO**************@TK2MSFTNGP05.phx.gbl...
Rene,

I don't believe you can do that, unless you actually hide the control
on top of it. The windows manager knows the z order of the windows, and
doesn't have the window render that part of itself.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Rene" <a@b.c> wrote in message
news:%2****************@TK2MSFTNGP04.phx.gbl...
Bob Powell has a code example called "Capturing the screen or the
surface of a control" found here:

http://www.bobpowell.net/capture.htm

I would like to know what in the world do I have to add to this code so
that the surface of the control is also captured even if there is
another control covering it.

Thank you. Please help!!!!!



May 21 '06 #4

This discussion thread is closed

Replies have been disabled for this discussion.