FlexGrid for WinForms | ComponentOne
C1.Win.C1FlexGrid Namespace / C1FlexGridBase Class / CreateImage Method / CreateImage() Method
Example

In This Topic
    CreateImage() Method
    In This Topic
    Creates an image of the entire grid.
    Syntax
    'Declaration
     
    
    Public Overloads Function CreateImage() As Image
    public Image CreateImage()

    Return Value

    An System.Drawing.Image object containing a metafile image of the grid.
    Remarks
    Use this method to copy grid images to the clipboard so you can paste them into documents or other applications.
    Example
    The code below creates an image of a grid range and saves it to a PNG file that can be included in other documents such as web pages:
    Image img = flex.CreateImage(0,0,10,5);
    img.Save(@"c:\temp\grid.png", System.Drawing.Imaging.ImageFormat.Png);
    See Also