PDA

Click to See Complete Forum and Search --> : comwiz


XxEvilxX
Nov 14th, 1999, 03:35 AM
Sub Sendtext(txt As TextBox)
Dim IMClass As Long, RICHEDIT As Long
IMClass& = FindWindow("IMClass", vbNullString)
RICHEDIT& = FindWindowEx(IMClass&, RICHEDIT&, "RICHEDIT", vbNullString)
RICHEDIT& = FindWindowEx(IMClass&, RICHEDIT&, "RICHEDIT", vbNullString)
Call SendMessage(IMClass&, WM_SETTEXT, ByVal txt.Text, 0&)
End Sub

Compwiz
Nov 14th, 1999, 04:01 AM
Private 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
Private 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
Private Const WM_SETTEXT = &HC
Private Const WM_GETTEXTLENGTH = &HE
Private Sub Command1_Click()
SendText Text1
End Sub
Sub SendText(TxtBox As TextBox)
Dim YMhWnd, YMhWnd2 As Long
YMhWnd = FindWindowEx(0, 0, "IMClass", vbNullString)
YMhWnd2 = FindWindowEx(YMhWnd, 0, "RICHEDIT", vbNullString)
YMhWnd = FindWindowEx(YMhWnd, YMhWnd2, "RICHEDIT", vbNullString)
Call SendMessageByString(YMhWnd, WM_SETTEXT, 0, TxtBox.Text)
End Sub


[This message has been edited by Compwiz (edited 11-14-1999).]

Compwiz
Nov 14th, 1999, 05:49 AM
Don't worry people, everything has been taken care of.

------------------
Tom Young, 14 Year Old
tyoung@stny.rr.com
ICQ: 15743470 (http://wwp.icq.com/15743470) Add Me (http://wwp.icq.com/scripts/search.dll?to=15743470) ICQ Me (http://wwp.icq.com/scripts/contact.dll?msgto=15743470)
AIM: TomY10 (http://www.aol.com/aim/aim30.html) Add Me (http://aim://addbuddy?screenname=TomY10) IM Me (http://aim://goim?screenname=TomY10&message=Hi.+I'm+from+VB-World)
PERL, JavaScript and VB Programmer