Export (0) Print
Expand All

Visual Basic: DataGrid Control

Visual Studio 6.0

CaptureImage Method

See Also   Example   Applies To

Returns a captured image of the grid's display in its current state.

Syntax

object.CaptureImage

The object placeholder represents an object expression that evaluates to an object in the Applies To list.

Remarks

Use the CaptureImage method to retrieve a snapshot of the grid.

The following code uses the CaptureImage method to assign a snapshot of a DataGrid control to a PictureBox control.

Picture1.Picture = DataGrid1.CaptureImage

Note   The CaptureImage method retrieves the image as a metafile typed image. Therefore, the image will resize to the size of its container.

Show:
© 2015 Microsoft