IWaitingBar.StartProcess (String, Boolean, Int32) Method

Starts notifying a new process. It optionally stops an existing process.
Sub StartProcess( _ 
ByVal description As String, _ 
Optional ByVal stopRunningProcess As Boolean = False, _ 
Optional ByVal timeBeforeShowing As Integer = 1000 _ 
)
This language is not supported or no code example is available.
void StartProcess( 
string description
bool stopRunningProcess = False, 
int timeBeforeShowing = 1000 
)
This language is not supported or no code example is available.

Parameters

description
string

The description of the active waiting bar to be set.

stopRunningProcess
bool

Indicates, whether to stop the previous process, if any, before the new process is started.

timeBeforeShowing
int

The time delay (in milliseconds) before the waiting bar is displayed. If the StopProcess or StopAllProcesses method is called at this time, the waiting bar is not displayed.

Remarks
 
This method sets the default caption similar to "Please Wait". If you want to have a different caption, call SetCaption afterward.
Example
 

// Get the waiting bar used in QDV.
 var waitBar = context.QdvManager.WaitingBar;
 
 try
 {
  // Enumerate all global variables and display the progress.
  if (waitBar != null)
  {
   waitBar.StartProcess("");
   waitBar.SetCaption("Enumerating global variables...");
  }
 
  var globalVars = es.CurrentVersion.GlobalVariables;
  foreach (var variable in globalVars.GetGlobalVariableNames())
  {
   // Display the progress.
   string progressText = variable;
   progressText += " = ";
   progressText += Convert.ToString(globalVars.GetVariableValue(variable));
   if (waitBar != null)
   {
    waitBar.SetDescription(progressText);
   }
 
   // Simulate a long lasting operation.
   System.Threading.Thread.Sleep(100);
  }
 }
 finally
 {
  // Close the progress bar.
  if (waitBar != null)
  {
   waitBar.StopAllProcesses();
  }
 }					
This language is not supported or no code example is available.

The following example demonstrates how to slowly enumerate all global variables and display the progress.

Version
 
Available since QDV 7.23.1050.

.NET Framework

Supported in: 4.8, 4.7, 4.6, 4.5.2

In this article

Definition