IMSEND AOL9 FR

bubble44 Messages postés 200 Date d'inscription lundi 10 mars 2003 Statut Membre Dernière intervention 3 août 2004 - 14 juil. 2004 à 21:03
xpwindaube Messages postés 14 Date d'inscription vendredi 28 mai 2004 Statut Membre Dernière intervention 10 décembre 2004 - 3 oct. 2004 à 17:02
Cette discussion concerne un article du site. Pour la consulter dans son contexte d'origine, cliquez sur le lien ci-dessous.

https://codes-sources.commentcamarche.net/source/24544-imsend-aol9-fr

xpwindaube Messages postés 14 Date d'inscription vendredi 28 mai 2004 Statut Membre Dernière intervention 10 décembre 2004
3 oct. 2004 à 17:02
waoo super c justement ce que je recherchais merci bcp ;-)
bubble44 Messages postés 200 Date d'inscription lundi 10 mars 2003 Statut Membre Dernière intervention 3 août 2004
15 juil. 2004 à 21:29
Wow ca serait cool, si ca marche, ca me permetterait a mon client cara : http://nantaises.free.fr/tr0p_xp.jpg

de permettre aux gens pour deconner de parler en chinois ou arabe, ils adorent la deconne.

;-)))))))
LolPiratas Messages postés 80 Date d'inscription mardi 13 août 2002 Statut Membre Dernière intervention 15 décembre 2010
15 juil. 2004 à 21:25
j'ai pas beaucoup de temps en ce moment a cause de mes fifilles jumelle et oui

module: si sa peut t'aider dans tes recherches

Public Declare Function SendMessageString& Lib "user32" Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, ByVal lParam As String)
Public Declare Function GetWindowText Lib "user32" Alias "GetWindowTextA" (ByVal hwnd As Long, ByVal lpString As String, ByVal cch As Long) As Long
Public Declare Function GetWindowTextLength Lib "user32" Alias "GetWindowTextLengthA" (ByVal hwnd As Long) As Long

Public Declare Function EnableWindow Lib "user32" (ByVal hwnd As Long, ByVal fEnable As Long) As Long
Public Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
Public Declare Function FindWindowEx Lib "user32" Alias "FindWindowExA" (ByVal hWnd1 As Long, ByVal hWnd2 As Long, ByVal lpsz1 As String, ByVal lpsz2 As String) As Long
Public Declare Function GetWindow Lib "user32" (ByVal hwnd As Long, ByVal wCmd As Long) As Long
Public Declare Function PostMessage Lib "user32" Alias "PostMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, ByVal lParam As Long) As Long
Public Declare Function SendMessageLong& Lib "user32" Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, ByVal lParam As Long)
Public Declare Function SendMessageByString Lib "user32" Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, ByVal lParam As String) As Long
Public Declare Function ShowWindow Lib "user32" (ByVal hwnd As Long, ByVal nCmdShow As Long) As Long
Public Const BM_SETCHECK = &HF1
Public Const BM_GETCHECK = &HF0

Public Const CB_GETCOUNT = &H146
Public Const CB_GETLBTEXT = &H148
Public Const CB_SETCURSEL = &H14E

Public Const GW_HWNDFIRST = 0
Public Const GW_HWNDNEXT = 2
Public Const GW_CHILD = 5

Public Const LB_GETCOUNT = &H18B
Public Const LB_GETTEXT = &H189
Public Const LB_SETCURSEL = &H186

Public Const SW_HIDE = 0
Public Const SW_MAXIMIZE = 3
Public Const SW_MINIMIZE = 6
Public Const SW_NORMAL = 1
Public Const SW_SHOW = 5

Public Const VK_SPACE = &H20

Public Const WM_CHAR = &H102
Public Const WM_CLOSE = &H10
Public Const WM_COMMAND = &H111
Public Const WM_GETTEXT = &HD
Public Const WM_GETTEXTLENGTH = &HE
Public Const WM_KEYDOWN = &H100
Public Const WM_KEYUP = &H101
Public Const WM_LBUTTONDBLCLK = &H203
Public Const WM_LBUTTONDOWN = &H201
Public Const WM_LBUTTONUP = &H202
Public Const WM_MOVE = &HF012
Public Const WM_RBUTTONDOWN = &H204
Public Const WM_RBUTTONUP = &H205
Public Const WM_SETTEXT = &HC
Public Const WM_SYSCOMMAND = &H112


Public Function richtext() As Long


Dim thunderrtformdc As Long
Dim richtextwndclass As Long
Dim thunderformdc As Long, thundercommandbutton As Long

thunderrtformdc& = FindWindow("thunderrt6formdc", vbNullString)
richtextwndclass& = FindWindowEx(thunderrtformdc&, 0&, "richtextwndclass", vbNullString)
richtextwndclass& = FindWindowEx(thunderrtformdc&, richtextwndclass&, "richtextwndclass", vbNullString)
thunderformdc& = FindWindow("thunderformdc", vbNullString)
thundercommandbutton& = FindWindowEx(thunderformdc&, 0&, "thundercommandbutton", vbNullString)

Caption$ = GetCaption(thunderrtformdc&)
Form1.Caption = Caption$
Form1.Label1.Caption = Caption$
richtext& = thunderrtformdc&

Exit Function

richtext& = thunderrtformdc&

End Function
Public Function GetCaption(WindowHandle As Long) As String
Dim Buffer As String, TextLength As Long
TextLength& = GetWindowTextLength(WindowHandle&)
Buffer$ = String(TextLength&, 0&)
Call GetWindowText(WindowHandle&, Buffer$, TextLength& + 1)
GetCaption$ = Buffer$
End Function
Public Function IMSend(Texte As String)
Dim ZoneTexte As Long
Dim zoneitexte As Long
Dim TORTU As String
ZoneTexte = FindWindowEx(richtext, 0&, "richtextwndclass", vbNullString)

Call SendMessageString(ZoneTexte, WM_SETTEXT, 0&, Texte) ' Met le texte dans la zone

End Function

form

Private Sub Command1_Click()
IMSend RichTextBox1
End Sub

Private Sub Form_Load()

End Sub

Private Sub Label1_Click()

End Sub


Private Sub RichTextBox1_Change()

End Sub

Private Sub RichTextBox2_Change()

End Sub

tu ecris dans la zone 1 et avec la fonction imsend tu l'envoi dans la zone 2
je reflechirai plus tard a la fonction gettext à bientot
Scalpweb Messages postés 1467 Date d'inscription samedi 13 mars 2004 Statut Membre Dernière intervention 5 mai 2010 4
15 juil. 2004 à 08:15
Ta source est très complète. Bravo.
bubble44 Messages postés 200 Date d'inscription lundi 10 mars 2003 Statut Membre Dernière intervention 3 août 2004
14 juil. 2004 à 21:03
J'ai regardé ta source, et je pense que tu en connais un rayon sur un truc obscure chez moi.
Je t'explique le hic :

Saurais tu avec un richtextbox, et en collant des caracteres Unicodes par exemple ceux la, regarde sur un navigateur :

http://www.google.fr/search?hl=fr&ie=UTF-8&q=www.edu.cn&btnG=Rechercher&meta=

du chinois, tu fais copié collé dans le richtextbox.

Bref saurais tu faire une fonction apres genre get_text_from_richtextbox ? c'est a dire remettre dans une variable String le contenu du richtextbox (si ca deconne ca fait des ?????? a place), la fonction gettext du richtextbox remet ca en Ansi.

Voila, sinon ta source est impressionnante lol, comprends pas que tu es mis niveau debutant.
A pluche.
=))))))
Rejoignez-nous