Click to See Complete Forum and Search --> : com. b/n two applications
October 29th, 1999, 12:49 PM
Hello,
Can i send a message to one of my application (SDI) from other(this is also my application, SDI).
if so, can the first application listen to that?
please somebody help me.
Thanks,
Sharath
rajga
October 29th, 1999, 07:28 PM
There can be many ways to this. It depends on what u'r application should do and the level of versatality that is needed. Two ways i can think of now
1) use socket programming
2) Use Windows API
(2) Let us say both are .EXE files. Create dummy forms on the VBP. On load, push the frm's handle (.hWnd property) to the registry and identify it as the calling application's handle. Similarly, the other EXE writes to the registry and identifies itself as the called application handle. Use SendMessage using the Handles and u'll be able to do handshaking and control the functioning of u'r EXEs.
Does this answer u'r question
Ravi Kiran
October 31st, 1999, 07:37 PM
You might as well write them as Active-x Server Exe.
By the way, is this supposed to be VC question, SDI and all that?!:-)
RK
Sky1000
November 2nd, 1999, 08:41 AM
If they are running on the same machine, you can use windows messaging. You can also use an Active-X exe com object as an interface between the two apps. In the good old days you could use DDE, but I believe that was phased out.
Sky 1000
Sharathms
November 3rd, 1999, 08:11 PM
Hi
thanx for all the infromtion.
and my app will be running on the same machine.
right now i have this code in my main()
If App.PrevInstance = true then
AppActivate "MyApp"
cmd$ = Command()
If cmd$ = "1" then
'here i need to call a function
'of the prev instance
else
'here i need to call one more function
'of the prev instance
End If
End
End If
regarding ActiveX stuff, i am neeewwww to vb programming.
can you tell me where can i get a good sample program please.
regards.
Sharath
codeguru.com
Copyright Internet.com Inc., All Rights Reserved.