ArcGIS Pro 3.2 API Reference Guide
ArcGIS.Desktop.Framework.Threading.Tasks Namespace / ProgressDialog Class / ProgressDialog Constructor / ProgressDialog Constructor(String,Boolean)
Example

In This Topic
    ProgressDialog Constructor(String,Boolean)
    In This Topic
    Creates a simple progress dialog.
    Syntax
    public ProgressDialog( 
       string message,
       bool delayedShow
    )
    Public Function New( _
       ByVal message As String, _
       Optional ByVal delayedShow As Boolean _
    )

    Parameters

    message
    delayedShow
    Example
    Running Geoprocessing Tool with ProgressDialog
    var progDlg = new ProgressDialog("Running Geoprocessing Tool", "Cancel", 100, true);
          progDlg.Show();
          
          var progSrc = new CancelableProgressorSource(progDlg);
    
          // prepare input parameter values to CopyFeatures tool
          string input_data = @"C:\data\california.gdb\ca_highways";
          string out_workspace = ArcGIS.Desktop.Core.Project.Current.DefaultGeodatabasePath;
          string out_data = System.IO.Path.Combine(out_workspace, "ca_highways2");
    
          // make a value array of strings to be passed to ExecuteToolAsync
          var parameters = Geoprocessing.MakeValueArray(input_data, out_data);
    
          // execute the tool
          await Geoprocessing.ExecuteToolAsync("management.CopyFeatures", parameters,
              null, new CancelableProgressorSource(progDlg).Progressor, GPExecuteToolFlags.Default);
    
          // dialog hides itself once the execution is complete
          progDlg.Hide();
    
    Requirements

    Target Platforms: Windows 11, Windows 10

    ArcGIS Pro version: 3 or higher.
    See Also