473,473 Members | 1,523 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

GDI+ Graphics Dump

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

Jul 28 '06 #1
4 994
ma*********@binaryswitch.com wrote:
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?
Jul 28 '06 #2

"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

Jul 28 '06 #3
ma*********@binaryswitch.com wrote:
>
>"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
Ah, ok...

Do a search on drawing to a bitmap.

http://www.samspublishing.com/articl...&seqNum=8&rl=1

Chris
Jul 28 '06 #4
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.

Jul 28 '06 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: °Ë´óɽÈË | last post by:
Hi guys, As you know, we can call SetROP2 to set the current foreground mix mode in GDI. But I doesn't work in GDI+. The step is: GetDC --> SetROP2 -->Graphics.FromDC, then draw sth by graphics...
5
by: anonymous | last post by:
I'm writing a program that deals extensively with the printer. For the most part my application runs fine, but occasionally I run into some Exceptions. The most common exceptions I run into are...
6
by: James dean | last post by:
I have heard that the video drivers in GDI+ are a big performance issue. But is this only an issue with something like Games Programming i think...is this wrong?. What about a drawing application...
1
by: James dean | last post by:
Could someone explain how this works. I think the graphics card is used to do blitting and drawing shapes like rectangles. How does it draw using the Graphics card on the PC and why is this feature...
7
by: | last post by:
We create VC++ programs that does some GDI drawing functionality. I discovered GDI+ and this seems to be a big step forward, and appears to be standard available in Windows XP and Windows Server...
15
by: David Lozzi | last post by:
Howdy, I have a function that uploads an image and that works great. I love ..Nets built in upload, so much easier than 3rd party uploaders! Now I am making a public function that will take the...
0
by: Lloyd Dupont | last post by:
In the same OnPaint() method I could mix GDI+ and GDI drawing. I have some hard to track nasty bug that appears sometimes (mainly when I print) and I wonder if any of the things I do are not...
1
by: Daniel | last post by:
Hi I had an app i write on DirectX that will nearly always run in a windowed situation. It could also have many instances running at a time and as such to keep the cpu usage down i had a frame...
14
by: James Wong | last post by:
Hi everybody, I'm facing a serious trouble relating to GDI+ generic error. The error message is "A Generic error occured in GDI+" and the following information is stored in Excepton object:...
2
by: Smokey Grindel | last post by:
when I do this code Dim HIcon As IntPtr = bmp.GetHicon to convert a Bitmap which is just a 16x16 image I pulled from a resource originally as an icon (16x16x32bit) then converted into a bitmap to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.