OK, to extract text from a text box on another application I declare a few APIs, namely FindWindow, FindWindowEx, SendMessage and SendMessageA. I then put in the following code:
Which stores the textbox text in a string strBuffer. If I wanted to, in stead of transferring text all over the place, transfer an image from an application to a picture box. A problem may arise in the fact that the picture in this application is being constantly updated because it's from a webcam. Any ideas??? Cheers in advance,Code:lngHwnd = FindWindowEx(0, 0, vbNullString, "Window Title") 'find the text inside the textbox lngTextbox = FindWindowEx(lngHwnd, 0, "RichEdit20A", vbNullString) lngTextLength = SendMessage(lngTextbox, &HE, 0, 0) 'create a buffer to hold text strBuffer = Space(lngTextLength) 'Get the text from the text box lngResult = SendMessageString(lngTextbox, &HD, lngTextLength + 1, ByVal strBuffer)
Sam




Reply With Quote