Show progress i ArcGIS Engine

347
4
06-17-2010 12:46 AM
by Anonymous User
Not applicable
Original User: Mathias Westin

I would like to add a progress indicator to our ArcGIS Engine application. Like a  progressbar in the statusbar to show when the MapControl is busy getting or drawing the map. I've been trying to find any resources in the documentation on how to do this, but all resources I find is pointing to the MxStatusBar that is only in the ArcGIS Desktop. Does anyone know wich events I should be using to create my own progress indicator?

Best Regards
Mathias Westin
Xlent Consulting Group
Sweden
Reply
0 Kudos
4 Replies
by Anonymous User
Not applicable
Original User: Mathias Westin

Moved my question to gis.stackexchange.com:
http://gis.stackexchange.com/questions/1280/show-progress-i-arcgis-engine-10-application
Reply
0 Kudos
Venkata_RaoTammineni
Occasional Contributor
Hi,

  Please can you refer below url

  http://www.codeproject.com/KB/cpp/statusbarprogresspanel.aspx

Thanks and Regards,

Venkat Tammineni
Reply
0 Kudos
by Anonymous User
Not applicable
Original User: Mathias Westin

Hi!

No it does not work. It stops animating when the Map is busy. I've successfully cerated a statusindicator that animates even when the Map is busy. So the biggest problem is finding events to start and stop the animation.
Reply
0 Kudos
Venkata_RaoTammineni
Occasional Contributor
Hi!

No it does not work. It stops animating when the Map is busy. I've successfully cerated a statusindicator that animates even when the Map is busy. So the biggest problem is finding events to start and stop the animation.


Sub ProgDialog()
  Dim pProDlgFact As IProgressDialogFactory
  Dim pStepPro As IStepProgressor
  Dim pProDlg As IProgressDialog2
  Dim pTrkCan As ITrackCancel
  Dim boolCont As Boolean
  Dim i As Long

  ' Create a CancelTracker
  Set pTrkCan = New CancelTracker

  ' Create the ProgressDialog. This automatically displays the dialog
  Set pProDlgFact = New ProgressDialogFactory
  Set pProDlg = pProDlgFact.Create(pTrkCan, Application.hWnd)

  ' Set the properties of the ProgressDialog
  pProDlg.CancelEnabled = True
  pProDlg.Description = "This is counting to 10000."
  pProDlg.Title = "Counting..."
  pProDlg.Animation = esriDownloadFile

  ' Set the properties of the Step Progressor
  Set pStepPro = pProDlg
  pStepPro.MinRange = 0
  pStepPro.MaxRange = 10000
  pStepPro.StepValue = 1
  pStepPro.Message = "Hello"

  ' Step. Do your big process here.
  boolCont = True
  For i = 0 To 10000
    Application.StatusBar.Message(0) = Str(i)
    'Check if the cancel button was pressed. If so, stop process
    boolCont = pTrkCan.Continue
    If Not boolCont Then
      Exit For
    End If
  Next i
End Sub
Reply
0 Kudos