Using Dynamic Data Exchange (DDE)
See Also
Visual Basic's DDE These data exchanges are called conversations. You start data exchanges by establishing DDE links , which you can create at design time or run time. Links you create at design time (see Creating a DDE Source or Destination Link ) are simplest because they are automatically reestablished whenever the application is run. However, when you create links at design time, the application with which you communicate must contain Copy and PasteLink commands. Similarly, when you run the Visual Basic project at a later time, the other application must be available or an error will occur. With design-time links, all updates to controls are made immediately and automatically whenever a data change occurs. Links that are established at design time may fail at run time if the other application is unable to refresh them.
Links created at run time are more flexible, but they require you to write enabling code that sets the properties of the controls involved in the data exchange. There are several advantages to creating links in code:
The other applications do not need Copy and PasteLink commands.
Your application can start the other application before initiating a conversation.
You can trap and handle errors.
When DDE links are created at run time, your application can choose when updates of data between linked controls actually occur.
Help:
DDE Example Between Visual Basic and Excel for Windows
Example of Source/Destination DDE Between Visual Basic Applications
LinkClose Event
LinkError Event
LinkExecute Event
LinkExecute Method
LinkItem Property
LinkMode Property
LinkNotify Event
LinkOpen Event
LinkPoke Method
LinkRequest Method
LinkSend Method
LinkTimeOut Property
LinkTopic Property
Programmer's Guide:
Chapter 20, "Communicating with Other Applications"