• Api Documentation
  • Source Code
Search Results for

    Show / Hide Table of Contents
    • SharpDialogs
      • SharpDialogFilter
      • SharpDialogHelpers
      • SharpFileOpenDialog
      • SharpFileSaveDialog
      • SharpFolderBrowserDialog
      • SharpInputBox
      • SharpProgressDialog
    • SharpDialogs.Wpf
      • SharpFileOpenDialogWpf
      • SharpFileSaveDialogWpf
      • SharpFolderBrowserDialogWpf
      • SharpProgressDialogWpf
    • SharpWpfAboutBox
      • SharpAboutBox
      • SharpAppProperties

    Class SharpProgressDialog

    A progress dialog.

    Inheritance
    object
    SharpProgressDialog
    SharpProgressDialogWpf
    Implements
    IDisposable
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: SharpDialogs
    Assembly: SharpDialogs.dll
    Syntax
    public class SharpProgressDialog : IDisposable

    Constructors

    | Edit this page View Source

    SharpProgressDialog(nint, string?, string?, bool, bool)

    Creates a progress dialog.

    Declaration
    public SharpProgressDialog(nint hwndParent, string? title, string? cancelMessage = null, bool allowCancel = true, bool showTime = true)
    Parameters
    Type Name Description
    nint hwndParent

    The handle of the owner window.

    string title

    The title of the dialog.

    string cancelMessage

    The cancel message of the dialog.

    bool allowCancel

    Shows a cancel button.

    bool showTime

    Shows the progress time.

    Methods

    | Edit this page View Source

    Dispose()

    Disposes the dialog.

    Declaration
    public void Dispose()
    | Edit this page View Source

    HasUserCancelled()

    Tests whether the user has cancelled the dialog.

    Declaration
    public bool HasUserCancelled()
    Returns
    Type Description
    bool

    Returns whether the user has cancelled the dialog.

    Exceptions
    Type Condition
    ObjectDisposedException
    | Edit this page View Source

    PauseTimer()

    Pauses the progress timer.

    Declaration
    public void PauseTimer()
    Exceptions
    Type Condition
    ObjectDisposedException
    | Edit this page View Source

    ResetTimer()

    Resets the progress timer.

    Declaration
    public void ResetTimer()
    Exceptions
    Type Condition
    ObjectDisposedException
    | Edit this page View Source

    ResumeTimer()

    Resumes the progress timer.

    Declaration
    public void ResumeTimer()
    Exceptions
    Type Condition
    ObjectDisposedException
    | Edit this page View Source

    SetLine1(string, bool)

    Sets the text of the first line of the dialog.

    Declaration
    public void SetLine1(string text, bool compactPath = false)
    Parameters
    Type Name Description
    string text

    The text.

    bool compactPath

    A value indicating whether the line is a path to compact.

    Exceptions
    Type Condition
    ObjectDisposedException
    | Edit this page View Source

    SetLine2(string, bool)

    Sets the text of the second line of the dialog.

    Declaration
    public void SetLine2(string text, bool compactPath = false)
    Parameters
    Type Name Description
    string text

    The text.

    bool compactPath

    A value indicating whether the line is a path to compact.

    Exceptions
    Type Condition
    ObjectDisposedException
    | Edit this page View Source

    SetProgress(ulong, ulong)

    Sets the progress of the dialog.

    Declaration
    public void SetProgress(ulong completed, ulong total)
    Parameters
    Type Name Description
    ulong completed

    The completed value.

    ulong total

    The total value.

    Exceptions
    Type Condition
    ObjectDisposedException

    Implements

    IDisposable
    • Edit this page
    • View Source
    In this article
    Back to top Copyright Jérémy Ansel (c) 2025