Okay, I've got this working to a point. Now, on the screen where I want to read from a particular textbox, there are more than one textbox on the screen with the same Class name. How do I specify that I want to read from a certain textbox? I'm using the following code to read the text, but again, it's reading from the first textbox on the screen, I want to read from the second one.

VB Code:
  1. If hwnd Then
  2.         '-- grab text out of textbox
  3.         hwnd2 = FindWindowEx(hwnd, 0, "Edit", vbNullString)
  4.         If hwnd2 Then
  5.             SetForegroundWindow hwnd
  6.             ret = SendMessage(hwnd2, WM_GETTEXTLENGTH, 0, 0)
  7.             buffer = Space(ret)
  8.             ret = SendMessageByString(hwnd2, WM_GETTEXT, ret + 1, buffer)
  9.             MsgBox buffer
  10.         End If
  11.     End If