GDI+ Graphics Dump

M

mark.milley

Hi all -

I'm a complete noob when it comes to using the system.drawing
namespace.

I'd like to draw a control to an image instead of on screen (the object
shouldn't appear on screen at all). Any ideas?

I was trying to use control.createGraphics, but it doesn't appear to
have any options to save the data to a different surface...

Is there any way to use the graphics object to draw to multiple
surfaces simultaneously?

Thanks,

-Mark
 
C

Chris

Hi all -

I'm a complete noob when it comes to using the system.drawing
namespace.

I'd like to draw a control to an image instead of on screen (the object
shouldn't appear on screen at all). Any ideas?

I was trying to use control.createGraphics, but it doesn't appear to
have any options to save the data to a different surface...

Is there any way to use the graphics object to draw to multiple
surfaces simultaneously?

Thanks,

-Mark

"I'd like to draw a control to an image instead of on screen"

What does that mean?
 
M

mark.milley

"I'd like to draw a control to an image instead of on screen"

What does that mean?

Instead of drawing it to the form surface (or simultaneously), I'd like
the control to paint itself onto a blank canvas in memory, so I can
save that as an image.

In this case, my end goal is to save a thumbnail of a web page *WITHOUT
SHOWING IT ON SCREEN*. However, this same technique could be used to
save a frame of a video, or anything else, for that matter.

-M
 
C

Chris

Instead of drawing it to the form surface (or simultaneously), I'd like
the control to paint itself onto a blank canvas in memory, so I can
save that as an image.

In this case, my end goal is to save a thumbnail of a web page *WITHOUT
SHOWING IT ON SCREEN*. However, this same technique could be used to
save a frame of a video, or anything else, for that matter.

-M
Ah, ok...

Do a search on drawing to a bitmap.

http://www.samspublishing.com/articles/article.asp?p=29477&seqNum=8&rl=1

Chris
 
M

mark.milley

Do a search on drawing to a bitmap.

No, I know how to draw to a bitmap. I'm trying to get (essentially) a
screenshot of a control without that control ever appearing on screen.

I can draw a bitmap.

I can get a screenshot if it's on screen.

What I can't do (yet) is have the control, without drawing itself to
the screen, draw itself to an image instead--(or some other technique
that would have the same result).

I've tried putting the control on an offscreen form and trying to
bitblt that, but it's not working.
 

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