Das Notes Forum
Domino 9 und frühere Versionen => ND6: Entwicklung => Thema gestartet von: Alexis am 08.07.05 - 09:55:21
-
Hallo Forum,
ich bin etwas ratlos, warum wird die Messagebox nicht so wie gewünscht öffnet. Sie kommt nur mit dem Button OK?
Hier der code:
In View Declarations:
%INCLUDE "lsconst.lss"
Als Button in der View:
Sub Click(Source As Button)
Dim session As New NotesSession
Dim workspace As New NotesUIWorkspace
Dim dbthis As NotesDatabase
Dim dc As NotesDocumentCollection
Dim datadoc As NotesDocument
Dim item As NotesItem
Set dbthis = session.CurrentDatabase
Set dc = dbthis.UnprocessedDocuments
Dim boxType As Long, answer As Integer
boxType& = MB_YESNO + MB_ICONQUESTIO
answer% = Messagebox ( "mit heutigem Datum" , boxType& , "Bitte auswählen!" )
Messagebox answer%
If dc.Count > 0 Then
Set datadoc = dc.getFirstDocument
While Not datadoc Is Nothing
Set notesDateTime = New NotesDateTime( "Today" )
Set item = datadoc.ReplaceItemValue( "Datum", notesDateTime )
Set item = datadoc.ReplaceItemValue( "Gültigkeit", "freigegeben" )
Call datadoc.Save( True, True )
Set datadoc = dc.GetNextDocument(datadoc)
Wend
End If
Call workspace.ViewRefresh
End Sub
-
Aus der Hilfe:
' Display the message "Do you want to continue?"
' in a message box labeled "Continue?" and containing
' Yes and No buttons. Assign the return value from
' the MessageBox function to the variable answer.
%Include "lsconst.lss"
Dim boxType As Long, answer As Integer
boxType& = MB_YESNO + MB_ICONQUESTION
answer% = MessageBox("Do you want to continue?", boxType&, _
"Continue?")
Sieht etwas anders aus ....
-
Als allererstes würde ich mal
Option Declare
unter den Optionen angeben. Der Rest ergibt sich dann wohl von selber
-
merci, es klappt :-*