Newsgroup: it.comp.appl.notes-domino
Titolo: Progress bar in LS?

Ciao a tutti,
ho un applicazione con un pulsante che deve essere cliccato dall'utente.
Il pulsante fa partire un LS che  volte puo' essere un po' lungo e quindi...
l'utente continua a cliccare pensando che non funzioni.
Vorrei implementare una progress bar che almeno dia l'impressione che qualcosa
sta succedendo e tranquillizzi l'utente.
Onestamente pero' non mi viene un idea per implementarla .
Qualcuno ha mai fatto una cosa simile? E' possibile? 
In che modo??
Grazie1000 a tutti
FAbio

"Fabietto" <fste...@NOSPAMyahoo.it> wrote in message
news:3ccd4063...@news.inet.it

How do you display progress to the user via LotusScript?
If you are processing a large collection of documents, it would be
useful to show the user progress so they don't think your application
has hung. Here is a method to show a progress meter in the status bar in
Notes:
REM "From Erden Eruc @ NGSINC"
Dim i As Integer
Dim s As String
 
'Is this 100 meter dash? no it is a meter with 100 dashes :)
 
s = "--------------------------------------------"&_
"--------------------------------------------------------"
For i = 1 To 100
  s = Left( Chr(1) & s, 100 )
  If i<10 Then
    Print "Percent Done:    "& Str(i)&"% - " & s 
  Elseif i = 100 Then
    Print "Percent Done:"& Str(i)&"% - " & s
  Else
    Print "Percent Done:  "& Str(i)&"% - " & s
  End If
Next
Print "Percent Done: 100% - Job complete..."
For a Win32-specific version that uses Notes functions (note: this is a
dangerous thing to do, but if you really must have a graphical progress
bar..):
Const NPB_TWOLINE% = 1
Const NPB_STATUSBAR% = 32
Declare Function NEMProgressBegin Lib "nnotesws.dll" ( Byval wFlags As
Integer ) As Long
Declare Sub NEMProgressDeltaPos Lib "nnotesws.dll" ( Byval hwnd As Long,
Byval dwIncrement As Long )
Declare Sub NEMProgressEnd Lib "nnotesws.dll" ( Byval hwnd 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 )
' From Mark Dixon @ Ives
Dim hwnd As Long
Dim i As Long
Dim j As Long
 
'Create the progress bar
hwnd = NEMProgressBegin( NPB_TWOLINE )
 
'Set the bar range - the default is 100
NEMProgressSetBarRange hwnd, 200
 
'Display some text on the dialog.  The second line is ignored if
NPB_TWOLINE not specified
NemProgressSetText hwnd, "Calculating..", "Start"
 
For i = 0 To 200
  'Simple delay loop to give us time to see whats going on
  For j = 0 To 5000     
  Next
  'Update the bar position - we could also use NEMProgressDeltaPos hwnd,
1 here
  NEMProgressSetBarPos hwnd, i 
  'Update the text at halfway
  If i = 100 Then
    NEMProgressSetText hwnd, "Calculating", "Half way"
  End If
Next
'Destroy the dialog when we're done
NEMProgressEnd hwnd
Questo è l'indirizzo dove ho preso il codice.
Ciao
http://www.keysolutions.com/NotesFAQ/howprogress.html
-- 
Posted via Mailgate.ORG Server - 
http://www.Mailgate.ORG

La Progress Bar in Lotusscript è uno dei tips più gettonati...  :-)
Qui c'è tutto:
http://www.keysolutions.com/NotesFAQ/howprogress.html
Ciao
