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
Printable View
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
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
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
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
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