Page 1 sur 1
MessageBox version API

Publié:
05 Nov 2007 à 16:43
par Michael DELIQUE
- Code : Tout sélectionner
Public Function MessageBox_API(wMessage As String, wnbType As Integer, wTitle As String) As Integer
'displays Windows message box (similar to the Messageboxfunction)
'wType follows the same construct as the messagebox LotusScript function
'0 = OK, 20 = YesNO, 17 = OK and Cancel and so on...
%REM
'variableAPI pour la fonction Beep_API
Declare Function NEMMessageBox Lib "nnotesws" ( wHandle As Integer, Byval szMessage As String, Byval szTitle As String, Byval wType As Integer) As Integer
%END REM
On Error Goto ErreurHandle
MessageBox_API = NEMMessageBox(0, wMessage, wTitle,wnbType)
Exit Function
ErreurHandle:
Msgbox "("+Structure_Log+" : "+Cstr(Getthreadinfo (1))+" Call by "+Cstr(Getthreadinfo(10))+")"+Chr(10)+"Erreur " + Str(Err) + " : "+Chr(10) + Cstr(Error)+". "+Chr(10)+"Ligne N° "+Cstr(Erl),16," ERREUR !" MessageBox_API = -1
Exit Function
End Function

Publié:
05 Nov 2007 à 16:49
par Michael DELIQUE
une autre version
- Code : Tout sélectionner
Public Sub DisplayMessage_API(wnbMessage)
'NEMDisplayMessage - displays affiche un message en s'appuyant sur NSTRINGS.DLL
%REM
'variableAPI pour la fonction DisplayError_API
Declare Function NEMDisplayMessage Lib "nnotesws" (Byval wMessageNumber As Integer) As Integer
%END REM
On Error Goto ErreurHandle
Call NEMDisplayMessage(wnbMessage)
Exit Sub
ErreurHandle:
Msgbox "("+Structure_Log+" : "+Cstr(Getthreadinfo (1))+" Call by "+Cstr(Getthreadinfo(10))+")"+Chr(10)+"Erreur " + Str(Err) + " : "+Chr(10) + Cstr(Error)+". "+Chr(10)+"Ligne N° "+Cstr(Erl),16," ERREUR !"
Set Session = New NotesSession
Call Error_LOG(Cstr(Session.Username),Cstr(Now),Structure_Log,Cstr(Getthreadinfo (1)),Cstr(Err),Cstr(Error),Cstr(Erl),Cstr(Getthreadinfo(10)))
Exit Sub
End Sub