Search
FlowChart.CreateBitmap Method
See Also
 



Creates a bitmap image representing the current diagram contents.

 Syntax

VB6  Copy Code

Public Function CreateBitmap () As Long

C++  Copy Code

public:
unsigned int CreateBitmap ()

 Return Value

A handle to a GDI bitmap object.

 Remarks

The method creates a GDI bitmap and draws the current diagram in the bitmap. Only a portion of the diagram can be drawn, by specifying rectangle coordinates via the ImageExportOptions property. That property also exposes a scaling factor to be used when drawing the diagram contents in the image. The created bitmap could be used to display overview of a diagram, or to export diagram to an image file.

 Example

The following sample shows how to export a jpeg file. The BmgLib library is used for jpeg creation, together with a wrapper COM object for that library that makes its use within VB easier:

VB6  Copy Code

Private Sub Command1_Click()

    Dim exporter As New BmgLib
    exporter.JpegQuality = 80
    exporter.SaveBitmapToFile flowchart1.CreateBitmap, "C:\test.jpg", True

End Sub

 See Also