ActiveReports 19 .NET Edition
MESCIUS.ActiveReports.Viewer.Common Assembly / GrapeCity.ActiveReports Namespace / PrinterSettings Class / UsePrintingThread Property
Example

In This Topic
    UsePrintingThread Property
    In This Topic
    Gets or sets a value indicating whether the printing process should be executed on a separate thread.
    Syntax
    'Declaration
     
    Public Property UsePrintingThread As Boolean
    public bool UsePrintingThread {get; set;}

    Property Value

    true if the printing process should be executed on a separate thread; otherwise, false. The default value is true.
    Remarks
    Utilizing a separate thread for the printing process can enhance the responsiveness of the user interface during long-running print jobs. When set to true, this property enables asynchronous printing, allowing the main application thread to remain responsive to user actions while the printing operation is executed in the background. Setting this property to false causes the printing process to run synchronously on the main application thread. This may be necessary in certain scenarios where printing operations need to be closely synchronized with other UI operations or when using printing components that do not support multithreaded execution. It is recommended to test the printing functionality in your specific application context to determine the most appropriate setting for this property.
    Example
    This example demonstrates how to disable the use of a separate printing thread for synchronous printing:
    var printerSettings = new GrapeCity.ActiveReports.PrinterSettings();
    printerSettings.UsePrintingThread = false;
    // Proceed with printing operations
    See Also