Free for PREMIUM members
Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium
/// Returns an image of the rendered item as a Bitmap object.
/// It is up to the caller of this method to dispose of the Bitmap
/// object returned when the caller is finished with it.
/// A Bitmap object containing the rendering of the current item.
public Bitmap GetItemAsBitmap()
// NOTE: You cannot wrap the Bitmap declaration in a using
// statement as that causes the Bitmap object to be
// disposed before the caller receives it. It is up to
// the caller to dispose of the Bitmap.
// Get a reference to the drawing surface of the control
using( Graphics source = this.CreateGraphics() )
// Create a bitmap that is the same width, height, and
// resolution as the control
Bitmap bitmap = new Bitmap( this.Width, this.Height, source );
// Create a graphics object on the blank bitmap so we can
// draw into it
using( Graphics target = Graphics.FromImage( bitmap ) )
// Get the screen coordinates of this control; we are looking
// for a point relative to the top left of the control (this)
// offset by x = 0 and y = 0 (Point.Empty)
Point screen = this.PointToScreen( Point.Empty );
// Copy from the screen into the bitmap (via the Graphics
target.CopyFromScreen( screen.X, screen.Y, 0, 0, this.Size );
Open in new window
Veeam Explore for Oracle delivers low RTOs and RPOs with agentless transaction log backup and transaction-level recovery of Oracle databases. You can restore the database to a precise point in time, even to a specific transaction.