Using Dynamic Data Exchange (DDE)

See AlsoK5RI2O

Visual Basic's DDEDEFDDE features enable your applications to directly and continuously exchange data with other Windows-based applications that support DDE.  These data exchanges are called conversations.  You start data exchanges by establishing DDE linksEVWV3S, which you can create at design time or run time.  Links you create at design time (see Creating a DDE Source or Destination LinkJ8NEMT) 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.


See Also

Help:

DDE Example Between Visual Basic and Excel for WindowsWSAZPC

Example of Source/Destination DDE Between Visual Basic Applications0J4Y6V

LinkClose Event17O5TU0

LinkError EventEGZX07

LinkExecute Event1OO8NGN

LinkExecute Method0JJE0GF

LinkItem Property2NMGNS5

LinkMode PropertyM1RK6S

LinkNotify Event1PIR0GG

LinkOpen EventM1TL81

LinkPoke MethodH222HJ

LinkRequest Method3HB029

LinkSend MethodH24SKI

LinkTimeOut Property3OGSG5

LinkTopic PropertyEVWV3S

 

Programmer's Guide:

Chapter 20, "Communicating with Other Applications"