Heute mal eine kleine Spielerei mit der Notes API.
Jeder kennt den Fortschrittsbalken, der sich bei der Replizierung oder dem Kopieren in den Vordergrund drängt.
Hier mal eine Variante in der Statuszeile
Const NPB_STATUSBAR% = 32
Declare Sub NEMProgressEnd Lib "nnotesws.dll" ( Byval hwnd As Long )
Declare Function NEMProgressBegin Lib "nnotesws.dll" ( Byval wFlags As Integer ) As Long
Declare Sub NEMProgressSetBarPos Lib "nnotesws.dll" ( Byval hwnd As Long, Byval dwPos As Long)
Declare Sub NEMProgressSetBarRange Lib "nnotesws.dll" ( Byval hwnd As Long, Byval dwMax As Long )
Declare Sub NEMProgressSetText Lib "nnotesws.dll" ( Byval hwnd As Long, Byval pcszLine1 As String, Byval pcszLine2 As String )
Und in den Buttton CLICK kommt dies :
Sub Click(Source As Button)
Dim hwnd As Long
Dim i As Long
Dim j As Long
'Create the progress bar
hwnd = NEMProgressBegin( NPB_STATUSBAR )
'Set the bar range - the default is 100
NEMProgressSetBarRange hwnd, 100
For i = 0 To 100
'Simple delay for the example!!
For j = 0 To 5000
Next
'Update the bar position
NEMProgressSetBarPos hwnd, i
Next
'Destroy the dialog when we're done
NEMProgressEnd hwnd
End Sub