Since my other post seems to have gone off-topic, here we go:
I have used this code to find the IM window on trillian:

VB Code:
  1. Option Explicit
  2. 'declare API:
  3. Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" _
  4.   (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
  5. Private Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Integer, ByVal lParam As Any) As Long
  6. Private Const My_Message As Long = 10001
  7.  
  8. Private Sub Form_Load()
  9.   'Class Name of the window:
  10.   Dim strClassName As String, lhWnd As Long, strclassname2 As String, lhWnd2 As Long
  11.   strClassName = "icoPMsgMSN"
  12.   strclassname2 = "icoPMsgAIM"
  13.   lhWnd = FindWindow(strClassName, vbNullString)
  14.   lhWnd2 = FindWindow(strclassname2, vbNullString)
  15.  
  16.   'if the result is 0, window was not found:
  17.   'If lhWnd = 0 & lhWnd2 = 0 Then
  18.    ' MsgBox "Could not find window..."
  19.    ' Unload Form1
  20.   'Else
  21.     MsgBox "Window found: " & "MSN:" & lhWnd & "AIM:" & lhWnd2
  22.  ' End If

i added SendMessage lhWnd, "Yo", 0&, 0&, <--to send the that window defined as lhwnd, that gives me an error as i assumed, but i need to find the textbox of the window im sending too with spy++, and i dont know what to look for, it gave me a page full of children..

My question is, how can i send a message to a textbox inside of an app, by its classname? the class name im looking for is: icoPMsgMSN <(which i do find)>


BTW im using trillian

thanks in advance