Anfängerfrage: Fortschrittsanzeige für User?
- Nutzer81
- Erledigt
-
-
@Nutzer:
wenn Du mit dem Prompt arbeitest, sollteste den noch mit etwas Text versehen:
unterhalb von NEMProgressSetBarRange hwnd, 50 noch hinzu fuegen:
NemProgressSetText hwnd, "Calculating........", "Start"
oder aehnliches
Diali:
liegt tatsaechlich an Version 6. In 5 bekommt man schon in der Statusbar einen blaune Balken...in 6 bekomme ich dne auch nicht hin..schade -
Hi Leute.....
Ich hab das auch mal ausprobiert und das funzt echt gut. Nur ist in meinem Fall der Fortschrittsbalken immer zu schnell auf 100%. Was ist falsch an meinem Script?
[color=000099]Sub Initialize
Dim ws As New NotesSession
Dim view As NotesView
Dim db As NotesDatabase
Dim doc As NotesDocument
Dim fri As NotesDocumentCollection
Dim anz As Integer
Dim pernr2 As Double
Dim pernr As String
Dim deli As NotesDocument
Dim feldi As NotesItem
Dim hwnd As Long
Dim zeli As Long
Dim j As Long
Set db = ws.CurrentDatabase
Set view = db.GetView("duplisearch")
Set doc = view.GetFirstDocument
zeli = view.EntryCount
i=1
hwnd = NEMProgressBegin( NPB_STATUSBAR )
NEMProgressSetBarRange hwnd, 50
NemProgressSetText hwnd, "Datenbank wird nach Duplikaten durchsucht........", "Bitte warten..."
Do While Not (doc Is Nothing)
pernr2 = doc.PERNR(0)
pernr = Cstr(pernr2)
Set fri = view.GetAllDocumentsByKey(pernr)
anz = fri.Count
If anz > 1 Then
Set deli = fri.GetLastDocument
Call fri.DeleteDocument(deli)
Call fri.RemoveAll(True)
anz = fri.Count
End If
i=i+1
Set doc = view.GetNthDocument(i)
NEMProgressSetBarPos hwnd, i
Loop
NEMProgressEnd hwnd
End Sub[/color] -
na ja mit "NEMProgressSetBarRange hwnd, 50" legst Du fest, dass 50 bei Dir 100 % sind.
Anstelle der 50 sollte die Anzahl der zu bearbeitenden Dokumente stehen. Suche Dir eine NotesDocumentCollection, die alle Dokumente in der View enthällt, dann kannst Du über NotesDocumentCollection.Count die Anzahl der Dokumente ermitteln.
Gruß
Dirk