|
-
Aug 8th, 2001, 06:18 AM
#1
Thread Starter
Addicted Member
How to Make Two Applictions Talk?
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????
-
Aug 8th, 2001, 07:12 AM
#2
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
-
Aug 12th, 2001, 10:45 PM
#3
Registered User
-
Aug 12th, 2001, 10:45 PM
#4
Registered User
sproll
use DDE:
-
Oct 3rd, 2001, 02:32 AM
#5
Fanatic Member
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?
-
Oct 3rd, 2001, 03:06 AM
#6
New Member
Hi Folk
can u give me example
how we can do using DDE
plz
sachin
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|