Link to home
Start Free TrialLog in
Avatar of lilanw
lilanw

asked on

Convert a Graphics object into Bitmap

Hi,

    I need to create a image using the Graphics Object. That means, in my system i'm drawing few lines and i want load it into a picture box. What i thaught was to convert the Graphics object into a bitmap and include the bitmap in the picture box. but i'm not sure how to do this. Can please tell me how to do this?

Thanks
ASKER CERTIFIED SOLUTION
Avatar of RomanPetrenko
RomanPetrenko

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
The Graphics object is a drawing adapter to a device or image. The Graphics object does not contain an image. It's only a adapter to the screen buffer or a bitmap.
For your case it would be the easiest to paint on the bitmap like RomanPetrenko showed you above and then Draw the bitmap on your form or display it in a picture box. (Then the picture box does the drawing for you.)
Avatar of RomanPetrenko
RomanPetrenko

I think the answer I gave is complete. Can it be graded?