I have a control that is a plotter that is scrolling. After the plotter has finished plotting, it is capable of scrolling like this:
My conspiracy is a real time conspiracy, that is, it means plots, as time passes and it is not a static plotter (which you manually put into values). After I have stopped the plotters, I am able to scroll around the plotter to see the results. However, I want to save the plotter in an image, which I am trying to use to print screen method. But what I was able to capture is only a part of the conspiracy, but the part of the plot is not visible (which means that it needs to be scrolled). I hope now it is clear that the code for the print screen is:
// Set the bitmap object in the size of the screen bmpScreenshot = new bitmap (panel2.Bounds.Width, panel2.Bounds .High, PixelFormat.Format32bppArgb); // Create a graphics object with Bitmap; gfxscreenshot = Graphics.FromImage (bmpScreenshot); Point P = this.PointToScreen (new point (panel2.Bounds.X, panel2.Bounds.Y)); Gfxscreenshot.CopyFromScreen (PX, P.Y, 0, 0, panel 2. bounce size, copypixel operation, sourcecopy); SaveFileDialog saveImageDialog = new SaveFileDialog (); SaveImageDialog.Title = "Select Output File:"; SaveImageDialog.filter = "JPAG image | * .jpg | Bitmap image | * .bmp | GIF image | * .GIF"; If (Sevmejialogiogi. Shodiolog () == Dialog Result. Oak) {BMPSCRS. Shot (save image dialogue.filename, image format.jpg); } Thanks a lot.
Take a look here: you should call Win32 API PrintWindow.
Comments
Post a Comment