>Okay, here's the answer we came up with
>
>
>** Return window handle of VB app
>lnhwnd = is_run([Form1])
>
>lclstring = "Did you get this message"
>
>
>sendmsg = RegFN('SendMessage', 'III@C', 'I')
>
>retval = CallFN(sendmsg, lnhwnd, 12, 0, @lclstring)
>
>We took this farther,
>
>The VB guys are writing the window handle of a textbox to an ini file, I'm opening the ini file and pulling that value out. I place that value in the lnhwnd variable and we can write directly to the textbox value.
>
>Thanx for your help.
hI Fred,
I have to agree with Vlad for a number of reasons. First and foremost is that I don't think that VB could process the message correctly anyway. I did, however, come across another reason. Before getting to that, I should point out that I have used SendMessage() from FPW using HWND_BROADCAST to cause open windows to reload a portion of the WIN.INI file with success.
The code below was used to try to shutdown VFP from FPW and FPW from VFP. From FPW it didn't work. From VFP it did.
SET LIBRARY TO FOXTOOLS ADDITIVE
m.hwnd = Is_Run("Microsoft Visual FoxPro")
m.sendmsg = RegFN("SendMessage", "LLLL", "L")
m.result = CallFN(m.sendmsg, m.hwnd, 16, 0 , 0)
lnhwnd = Is_Run32("Microsoft FoxPro")
DECLARE INTEGER SendMessage IN Win32API;
INTEGER hwnd, INTEGER umsg, INTEGER wparam, INTEGER, lparam
lnresult = SendMessage(lnhwnd, 16, 0 , 0)
I also tried from FPW to use WM_QUIT, WM_DESTROY, WM_QUERYENDSESSION without succeeding.
As I said orignally, I think the best way to accomplish this is via DDE.
Sorry,
George
Ubi caritas et amor, deus ibi est