Is there anyway to send a message from one application to another. In particular, I want one program to send a message to another to let the second application know where the first is in processing.
Does this make sense????
Printable View
Is there anyway to send a message from one application to another. In particular, I want one program to send a message to another to let the second application know where the first is in processing.
Does this make sense????
One method is to create a custom message that can be sent with SendMessage() or PostMessage(). There are 2 ways to do this. One is to call the RegisterWindowMessage() function, which will register a speific message globally. The other method is to create a custom message by adding a value to WM_USER. Then to capture this message, you need to subclass your window.
Pick one of the following methods, and add the code to both of your programs.
Method 1
VB Code:
'In a module Public Declare Function RegisterWindowMessage Lib "user32" Alias "RegisterWindowMessageA" (ByVal lpString As String) As Long Public WM_MYMESSAGE As Long 'In Form_Load() WM_MYMESSAGE = RegisterWindowMessage("MyMessage")
Method 2
VB Code:
'In a Module Public Const WM_USER = &H400 Public WM_MYMESSAGE As Long 'In Form_Load() WM_MYMESSAGE = WM_USER + 100
use DDE
use DDE::o
Megatron,
What do you mean by "subclass the form"?
How will i know when the receiving application has received a message? Is there an event for this?
Hi Folk
can u give me example
how we can do using DDE
plz
sachin