hi,
the windows of my windows application is divided into 3 parts but split container. now i have to print the panel in the middle part but everytime i get other things such as messagebox with the imange. also i want to print the whole content of panel though whole content is not seen directly for example in excel sheet we can get all the recorsd though not seen at a time in screen i.e hidden contents. but i m not being successful . i have attached the image after CreateGraphic and savegraphics along with the post.
private void CaptureScreen() { //MessageBox.Show("Capture screen"); Graphics myGraphics = this.splitContainer2.CreateGraphics(); MessageBox.Show("graphics created"); Size s = this.panel_payment_schedule.Size; Bitmap memoryImage = new Bitmap(s.Width, s.Height, myGraphics); Graphics memoryGraphics = Graphics.FromImage(memoryImage); memoryGraphics.CopyFromScreen(this.panel_payment_schedule.Location.X, this.panel_payment_schedule.Location.Y, 0, 0, s); if (System.IO.File.Exists(@"c:\PrintPage.jpg")) { System.IO.File.Delete(@"C:\PrintPage.jpg"); }
Thanks
|
No responses found. Be the first to respond and make money from revenue sharing program.
|