Results 1 to 3 of 3

Thread: comwiz

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Jul 1999
    Posts
    219

    Post

    Code:
    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

  2. #2
    Hyperactive Member
    Join Date
    Jul 1999
    Location
    NY, USA
    Posts
    270

    Post

    Code:
    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).]

  3. #3
    Hyperactive Member
    Join Date
    Jul 1999
    Location
    NY, USA
    Posts
    270

    Post

    Don't worry people, everything has been taken care of.

    ------------------
    Tom Young, 14 Year Old
    [email protected]
    ICQ: 15743470 Add Me ICQ Me
    AIM: TomY10 Add Me IM Me
    PERL, JavaScript and VB Programmer


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width