📚 SAP Business One SDK Help

ProgressBar Object
See Also  Members  Example

Description

Represents a progress bar created using StatusBar.CreateProgressBar.

Remarks

Only one progress bar can be activated in the application. If the progress bar has been activated by another program, you cannot  use it until it is released, which triggers the pbet_ProgressBarReleased event.

When creating a progress bar with a Stop button (StatusBar.CreateProgressBar(Stoppable=True)), clicking the Stop button does not release the progress bar for other programs.

To stop the progress bar after the user clicks the built-in Stop button:

  1. Catch the SBO_Application_ProgressBarEvent.pbet_ProgressBarStopped event.
  2. Call ProgressBar.Stop to release the progress bar and return the application to normal mode.

If you don't want to stop the progress bar, set BubbleEvent = false when BeforeAction = true.

Example

Creating a progress bar (Visual Basic)Copy Code
'// Start the progress bar
Dim m_oProgBar As SAPbouiCOM.ProgressBar
Set m_oProgBar = m_App.StatusBar.CreateProgressBar("My Progress Bar", 10, True)
m_oProgBar.Value = 0

'// Forward\Backward commands
Dim iPos As Integer
iPos = m_oProgBar.Value
m_oProgBar.Value = iPos – 1 / +1

'// Stop the progress bar
m_oProgBar.Stop
Set m_oProgBar = Nothing

See Also