Autor Thema: Notes Process Bar über LS generieren  (Gelesen 6348 mal)

Offline 0xse

  • Gold Platin u.s.w. member:)
  • *****
  • Beiträge: 507
  • Geschlecht: Männlich
Notes Process Bar über LS generieren
« am: 02.02.05 - 13:49:40 »


Lässt sich solch eine Process Bar auch aus Lotus Script heraus generieren? Wäre ungemein besser für den User als nur der kleine Statustext unten am Rand, den ich mit Print ausgebe. In der Hilfe habe ich dazu leider nichts gefunden.

Driri

  • Gast
Re: Notes Process Bar über LS generieren
« Antwort #1 am: 02.02.05 - 14:07:08 »
Über API solls gehen (siehe Code unten, ungetestet). Ansonsten hab ich irgendwo mal nen Beispiel gesehen, wo der Fortschritt in der Statusleiste mit Hilfe von Pipes "|" dargestellt wurde.

Zitat
Thanks to this class, you can now display a graphical Progress bar in Lotus Script !

List of methods :
-----------------
SetText : Display the text in progress bar

SetProgressPos : Set-up the max elements in the progress bar, if you have a list with 230 elements then set the MAX to 230 elements.For every element you
proceed increase the SetProgressPos by one to reached 230

DeltaPos :This function adds the number in DPOS to the current ProgressPos

Delete : Terminate the progress bar on the screen

-------------------------------------------
'Sample to test the code
'You can paste this code into the click event of a button

'We need two lines on the progress bar

Dim pb As New LNProgressBar(True)
Dim i As Long

Call pb.SetText("This is line one","This is line two")

'We set the range to 200 elements
Call pb.SetProgressRange(200)

For i=1 To 200
'we process the elements
Call pb.SetProgressPos(i)
Next

'Terminate the progress bar
Delete pb
 

 
'The class LNProgressbar should be pasted into the Declarations in a Lotus script library.

Declare Public Function NEMProgressBegin Lib "nnotesws.dll" ( Byval wFlags As Integer ) As Long
Declare Public Sub NEMProgressDeltaPos Lib "nnotesws.dll" ( Byval hwnd As Long, Byval dwIncrement As Long )
Declare Public Sub NEMProgressEnd Lib "nnotesws.dll" ( Byval hwnd As Long )
Declare Public Sub NEMProgressSetBarPos Lib "nnotesws.dll" ( Byval hwnd As Long, Byval dwPos As Long)
Declare Public Sub NEMProgressSetBarRange Lib "nnotesws.dll" ( Byval hwnd As Long, Byval dwMax As Long )
Declare Public Sub NEMProgressSetText Lib "nnotesws.dll" ( Byval hwnd As Long, Byval pcszLine1 As String, Byval pcszLine2 As String )

Const NPB_TWOLINE = 3
Const NPB_ONELINE = 2

Public Class LNProgressbar

hwnd As Long

Sub New(SecondLineVisible As Integer)
'Set-up the progress bar on the screen
If SecondLineVisible Then
hwnd = NEMProgressBegin(NPB_TWOLINE)
Else
hwnd = NEMProgressBegin(NPB_ONELINE)
End If
End Sub

Sub SetText(FirstLineText As String,SecondLineText As String)
'Display the text in progress bar
NemProgressSetText hwnd, FirstLineTExt,SecondLineText
End Sub

Sub SetProgressPos(Progresspos As Long)
NEMProgressSetBarPos hwnd, ProgressPos
End Sub

Sub SetProgressRange(ProgressMaxElements As Long)
'Set-up the max elements in the progress bar, if you have
'a list with 230 elements then set the MAX to 230 elements.
'For every element you proceed increase the SetProgressPos
'by one to reached 230

NEMProgressSetBarRange hwnd, ProgressMaxElements

End Sub

Sub DeltaPos(DPos As Long)
' This function adds the number in DPOS to the current ProgressPos
NEMProgressDeltaPos hwnd, DPos
End Sub

Sub Delete
'Terminate the progress bar on the screen
NEMProgressEnd hwnd
End Sub
End Class
 

Offline 0xse

  • Gold Platin u.s.w. member:)
  • *****
  • Beiträge: 507
  • Geschlecht: Männlich
Re: Notes Process Bar über LS generieren
« Antwort #2 am: 02.02.05 - 14:44:08 »
Danke :)

Offline Axel

  • Moderator
  • Gold Platin u.s.w. member:)
  • *****
  • Beiträge: 8.658
  • Geschlecht: Männlich
  • It's not a bug, it's Notes
Re: Notes Process Bar über LS generieren
« Antwort #3 am: 02.02.05 - 15:33:16 »
Hi,

hier gibt's eine Bibliothek zur direkten Übernahme in eigene DB's

Bibliothek mit Progressbar


Axel
Ohne Computer wären wir noch lange nicht hinterm Mond!

 

Impressum Atnotes.de  -  Powered by Syslords Solutions  -  Datenschutz