How to show the progress in DevExpress Progress bar ?


In this, I will show you how to show the progress in a DevExpress Progress bar. I am having a DevExpress RibbonForm. In the status bar of it, I have placed a progress bar (BarEditItemProgressBar).We could use this progress bar while reading data from database or so. The following code may be used for showing the progress. Because in DevExpress, there is no property like increment as in normal Progress Bar.

'Declare ProgressBarCount globally


Dim ProgressBarCount as Integer = 0


In BarEditItemProgressBar, there is no property like Increment to show the progress. So we need to write the following code in between the other code. For example, if you are reading data from database, we should insert these code in between the code for reading data, wherever necessary.




'At the start of the progress

ProgressBarCount = 0
BarEditItemProgressBar.EditValue = ProgressBarCount
BarEditItemProgressBar.Caption = "Progress"
If (pbcount Mod 100) = 0 Then
Application.DoEvents()
End If

'At the middle of the progress
ProgressBarCount = 50
BarEditItemProgressBar.EditValue = ProgressBarCount
BarEditItemProgressBar.Caption = "Reading..."
If (pbcount Mod 100) = 50 Then
Application.DoEvents()
End If

'At the end

ProgressBarCount = 100
BarEditItemProgressBar.EditValue = ProgressBarCount
BarEditItemProgressBar.Caption = "Finished"
If (pbcount Mod 100) = 0 Then
Application.DoEvents()
End If


Comments

No responses found. Be the first to comment...


  • Do not include your name, "with regards" etc in the comment. Write detailed comment, relevant to the topic.
  • No HTML formatting and links to other web sites are allowed.
  • This is a strictly moderated site. Absolutely no spam allowed.
  • Name:
    Email: