this is my code
Bitmap bitmap = new Bitmap(MainPicturebox.Width, MainPicturebox.Height);
Rectangle bitmapRect = new Rectangle(0, 0, MainPicturebox.Width, MainPicturebox.Height);
panel1.DrawToBitmap(bitmap, bitmapRect);
System.Drawing.Image origImage = bitmap;
System.Drawing.Image origThumbnail = new Bitmap(120, 90, origImage.PixelFormat);
Graphics oGraphic = Graphics.FromImage(origThumbnail);
oGraphic.CompositingQuality = CompositingQuality.HighQuality;
oGraphic.SmoothingMode = SmoothingMode.HighQuality;
oGraphic.InterpolationMode = InterpolationMode.HighQualityBicubic;
Rectangle oRectangle = new Rectangle(0, 0, 120, 90);
oGraphic.DrawImage(origImage, oRectangle);
origImage.Save("Screenshot.png", ImageFormat.Png);
origImage.Dispose();
Right now it takes a screen shot of the panel including the scroll bar which i don't wont in it, I want it to take a screen shot of all that is in the panel for example, i might have a autosized picuebox which autosized beond the bounries of the panel, whcih will show the scroll bars, i want it to take a screen shot of everytthing, all the stuff beond the broundies and etc etc, but i don't want to the scroll bars to be seen wither, can some one please help me achive this?