IT Community - Software Programming, Web Development and Technical Support

How to create an image from panel background Image

This is a discussion on How to create an image from panel background Image within the C# Programming forums, part of the Software Development category; Hi all, I'm creating an user control. On there I'm drawing an image in it's on Paint ...


Go Back   IT Community - Software Programming, Web Development and Technical Support > Software Development > C# Programming

Register FAQ Members List Calendar Mark Forums Read
  #1 (permalink)  
Old 09-27-2007, 11:50 PM
S.Vinothkumar S.Vinothkumar is offline
D-Web Genius
 
Join Date: May 2007
Posts: 1,061
S.Vinothkumar is on a distinguished road
Question How to create an image from panel background Image

Hi all,

I'm creating an user control. On there I'm drawing an image in it's on Paint method. And I add this user control in to a panel. I added two controls in that panel. That panel also have a background image. Now I need to create an image with the both of panel and user control images.


How to do? Is any Idea?
__________________
S.VinothkumaR
Behind me is infinite power,
Before me is Endless Possibility,
Around me is Boundless Opportunity,
Why should I fear!
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 10-22-2007, 03:52 AM
krishnakumar krishnakumar is offline
D-Web Analyst
 
Join Date: May 2007
Posts: 206
krishnakumar is on a distinguished road
Cool Re: How to create an image from panel background Image

Hi,

Here is sample coding...

Code:
Bitmap bmp = new Bitmap(panel1.Width, panel1.Height);
Rectangle rect = new Rectangle(0, 0, panel1.Width, panel1.Height);
panel1.DrawToBitmap(bmp, rect);
bmp.Save("test.jpg");
Hope this will help you....
__________________
Krishnakumar.S
Beware of Everything -that is un true; stick to the Truth shall succeed slowly but steadily
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
DPI of an Image Anandavinayagam C# Programming 5 03-06-2008 10:23 PM
Convert image to other image format using CODEC in .NET 3.0 Mramesh C# Programming 0 02-07-2008 03:33 AM
How to set background image for <td> using style property? poornima HTML, CSS and Javascript Coding Techniques 6 01-31-2008 12:24 AM
How to create BMP thumbnail image in PHP? Jeyaseelansarc PHP Programming 2 10-13-2007 01:05 AM
Can we capture the desktop background image programatically using c#? mobilegeek C# Programming 1 07-20-2007 01:10 AM


All times are GMT -7. The time now is 02:24 PM.


Copyright ©2004 - 2007, DiscussWeb. All Rights Reserved.

SEO by vBSEO 3.0.0