Click here to Skip to main content
Rate this: bad
Please Sign up or sign in to vote.
See more: .NET WinForm 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 3:07am
Edited 4-Jul-12 3:10am

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

  Print Answers RSS
0 OriginalGriff 239
1 Sarvesh Kumar Gupta 185
2 George Jonsson 154
3 ArunRajendra 144
4 Richard MacCutchan 140

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