MessageBox version API

MessageBox version API

Messagepar Michael DELIQUE » 05 Nov 2007 à 16:43

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
Cordialement

Michael (SMS-Phobique)
----------------------------
"La théorie, c'est quand on sait tout et que rien ne fonctionne. La pratique, c'est quand tout fonctionne et que personne ne sait pourquoi."
Albert EINSTEIN
Avatar de l’utilisateur
Michael DELIQUE
Administrateur
Administrateur
 
Message(s) : 12183
Inscrit(e) le : 16 Déc 2004 à 10:36
Localisation : Paris/Cergy

Messagepar Michael DELIQUE » 05 Nov 2007 à 16:49

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
Cordialement

Michael (SMS-Phobique)
----------------------------
"La théorie, c'est quand on sait tout et que rien ne fonctionne. La pratique, c'est quand tout fonctionne et que personne ne sait pourquoi."
Albert EINSTEIN
Avatar de l’utilisateur
Michael DELIQUE
Administrateur
Administrateur
 
Message(s) : 12183
Inscrit(e) le : 16 Déc 2004 à 10:36
Localisation : Paris/Cergy


Retour vers API