code_vb_source
Messages postés44Date d'inscriptionmercredi 28 mars 2007StatutMembreDernière intervention31 mars 2011
-
19 mars 2009 à 11:11
code_vb_source
Messages postés44Date d'inscriptionmercredi 28 mars 2007StatutMembreDernière intervention31 mars 2011
-
19 mars 2009 à 11:59
Selem, comment rendre msgbox affiche un texte en arabe
Renfield
Messages postés17287Date d'inscriptionmercredi 2 janvier 2002StatutModérateurDernière intervention27 septembre 202174 19 mars 2009 à 11:28
allez, je donne du code :
Private Const MB_RTLREADING As Long = &H100000
Private Sub Form_Load()
Dim sArabicString As String
sArabicString = ChrW(&H625) & ChrW(&H650) & ChrW(&H64A) & ChrW(&H647) & ChrW(&H64E) & ChrW(&H627) & ChrW(&H628) & ChrW(&H64C)
MsgBox sArabicString, MB_RTLREADING Or vbInformation, sArabicString
End Sub
et déclarer dans un module une version adaptée de MsgBox :
Private Declare Function MessageBox Lib "user32.dll" Alias "MessageBoxW" (ByVal hwnd As Long, ByVal lpText As Long, ByVal lpCaption As Long, ByVal wType As Long) As Long
Private Const MB_TASKMODAL As Long = &H2000&
Function MsgBox(ByRef vzPrompt As Variant, Optional ByVal Buttons As VbMsgBoxStyle = vbOKOnly, Optional ByVal vzTitle As Variant) As VbMsgBoxResult
Dim sPrompt As String
If IsMissing(vzTitle) Then
vzTitle = App.Title
End If
sPrompt = vzPrompt
MsgBox = MessageBox(0, StrPtr(sPrompt), StrPtr(vzTitle), Buttons Or MB_TASKMODAL)
End Function