GdPicture.NET.14
GdPicture14 Namespace / GdViewer Class / PrintSetShowPrintingProgress Method
Set this parameter to true if you want to show the progress bar during the print process, otherwise set it to false. The default value is true.
Example





In This Topic
PrintSetShowPrintingProgress Method (GdViewer)
In This Topic
Enables or disables showing the progress indicator during the print process. The printing progress bar is displayed by default.
Syntax
'Declaration
 
Public Function PrintSetShowPrintingProgress( _
   ByVal Show As Boolean _
) As GdPictureStatus
public GdPictureStatus PrintSetShowPrintingProgress( 
   bool Show
)
public function PrintSetShowPrintingProgress( 
    Show: Boolean
): GdPictureStatus; 
public function PrintSetShowPrintingProgress( 
   Show : boolean
) : GdPictureStatus;
public: GdPictureStatus PrintSetShowPrintingProgress( 
   bool Show
) 
public:
GdPictureStatus PrintSetShowPrintingProgress( 
   bool Show
) 

Parameters

Show
Set this parameter to true if you want to show the progress bar during the print process, otherwise set it to false. The default value is true.

Return Value

A member of the GdPictureStatus enumeration. If the method has been successfully followed, then the return value is GdPictureStatus.OK.

We strongly recommend always checking this status first.

Remarks
It is recommend to use the GetStat method or the PrintGetStat method to identify the specific reason for the method's failure, if any.
Example
How to disable displaying the printing progress bar.
'We assume that the GdViewer1 control has been properly integrated.
If GdViewer1.DisplayFromFile("") = GdPictureStatus.OK Then
    'The printing progress bar will not display.
    GdViewer1.PrintSetShowPrintingProgress(False)
    If GdViewer1.Print() = GdPictureStatus.OK Then
        MessageBox.Show("The file has been printed successfully.", "GdViewer.PrintSetShowPrintingProgress")
    Else
        Dim message As String = "The file can't be printed." + vbCrLf + "Status: " + GdViewer1.GetStat().ToString()
        If GdViewer1.PrintGetStat() = GdPictureStatus.PrintingException Then message = message + "    Error: " + GdViewer1.PrintGetLastError()
        MessageBox.Show(message, "GdViewer.PrintSetShowPrintingProgress")
    End If
    GdViewer1.CloseDocument()
Else
    MessageBox.Show("The file can't be displayed. Status: " + GdViewer1.GetStat().ToString(), "GdViewer.PrintSetShowPrintingProgress")
End If
//We assume that the GdViewer1 control has been properly integrated.
if (GdViewer1.DisplayFromFile("") == GdPictureStatus.OK)
{
    //The printing progress bar will not display.
    GdViewer1.PrintSetShowPrintingProgress(false);
    if (GdViewer1.Print() == GdPictureStatus.OK)
    {
        MessageBox.Show("The file has been printed successfully.", "GdViewer.PrintSetShowPrintingProgress");
    }
    else
    {
        string message = "The file can't be printed.\nStatus: " + GdViewer1.GetStat().ToString();
        if (GdViewer1.PrintGetStat() == GdPictureStatus.PrintingException)
            message = message + "    Error: " + GdViewer1.PrintGetLastError();
        MessageBox.Show(message, "GdViewer.PrintSetShowPrintingProgress");
    }
    GdViewer1.CloseDocument();
}
else
{
    MessageBox.Show("The file can't be displayed. Status: " + GdViewer1.GetStat().ToString(), "GdViewer.PrintSetShowPrintingProgress");
}
See Also