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.



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


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.