But i got to thinking, and realised (with the help of a memory objects viewer) that the VB form i was using for DDE was a parent window, with just one textbox under it - a child window...
So i thought - if I can find the hWnd of the parent window, and then grab the hWnd of it's first child window (as there's only one), then wallah! I would be able to change the text - which triggers the remote VB program (it activates on Text1_Change)
And it worked!!

Code:
#COMPILE EXE #INCLUDE "WIN32API.INC" FUNCTION ENCW(BYVAL hWnd AS LONG, BYVAL lParam AS LONG) AS LONG ON ERROR RESUME NEXT SendText$ = "String to put in textbox of the VB program" SendMessage hWnd, %WM_SETTEXT, 0, STRPTR(SendText$) SLEEP 50 END FUNCTION FUNCTION WinMain(BYVAL hCurInstance AS LONG, _ BYVAL hPrevInstance AS LONG, _ lpszCmdLine AS ASCIIZ PTR, _ BYVAL nCmdShow AS LONG) _ EXPORT AS LONGWin IF FindWindow("ThunderRT6FormDC","FormDDE") > 0 THEN EnumChildWindows FindWindow ("ThunderRT6FormDC","FormDDE"), CODEPTR(ENCW), 0 END FUNCTION
------------------
Leave a comment: