GdPicture.NET.14
GdPicture14 Namespace / GdPictureImaging Class / PrintGetStat Method
Example





In This Topic
PrintGetStat Method (GdPictureImaging)
In This Topic
Returns the status of the last executed print operation. You can use the PrintGetLastError method to find out more details.
Syntax
'Declaration
 
Public Function PrintGetStat() As GdPictureStatus
public GdPictureStatus PrintGetStat()
public function PrintGetStat(): GdPictureStatus; 
public function PrintGetStat() : GdPictureStatus;
public: GdPictureStatus PrintGetStat(); 
public:
GdPictureStatus PrintGetStat(); 

Return Value

A member of the GdPictureStatus enumeration. The status of the last executed print operation.
Example
Printing an image with the help of standard Windows Printer Dialog.
using (GdPictureImaging gdpictureImaging = new GdPictureImaging())
{
    // Open an image file. An empty string allows the control to prompt for selecting a file.
    int imageID = gdpictureImaging.CreateGdPictureImageFromFile("");
 
    if (gdpictureImaging.PrintDialog(imageID) == false)
    {
        MessageBox.Show("Printing failed for " + gdpictureImaging.PrintGetDocumentName() +
                        "\nError: " + gdpictureImaging.PrintGetStat() +
                        "\nMessage: " + gdpictureImaging.PrintGetLastError(), "Printing status", MessageBoxButtons.OK, MessageBoxIcon.Error);
    }
    else
        MessageBox.Show("Printing succeded for " + gdpictureImaging.PrintGetDocumentName(), "Printing status", MessageBoxButtons.OK, MessageBoxIcon.Information);
 
    // Release used resources.
    gdpictureImaging.ReleaseGdPictureImage(imageID);
}
See Also