Click here to Skip to main content
12,813,994 members (33,434 online)
Rate this:
Please Sign up or sign in to vote.
See more: .NET export

I have large content inside scrollable panel in windows form and i want to export all the content inside that panel to image .currently i am using below code but it saves only active form data.please help to save all the content.

this.treePanel.Dock = System.Windows.Forms.DockStyle.None;

                Bitmap bmp = new Bitmap(treePanel.Width, treePanel.Height);
                Rectangle rect = new Rectangle(0, 0, treePanel.Width, treePanel.Height);
                this.treePanel.DrawToBitmap(bmp, rect);

                this.treePanel.Dock = System.Windows.Forms.DockStyle.Fill;
                SaveFileDialog svDailog = new SaveFileDialog();
                svDailog.Filter = "JPEG Images (*.jpg,*.jpeg)|*.jpg;*.jpeg|Gif Images (*.gif)*.gif|Bitmaps (*.bmp)*.bmp";
                svDailog.FilterIndex = 1;
                DialogResult dr = svDailog.ShowDialog();
                if (dr.Equals(DialogResult.OK))
                    string _filename = svDailog.FileName;

Please help....

Posted 4-Jul-12 4:07am
Updated 4-Jul-12 4:10am

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

    Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web02 | 2.8.170308.1 | Last Updated 4 Jul 2012
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100