Returns or sets the type of link used for a DDEconversation and activates the connection as follows:
Syntax
object.LinkMode [= number]
The LinkMode property syntax has these parts:
Part | Description |
Object | An object expression that evaluates to an object in the Applies To list. |
Number | An integer that specifies the type of connection, as described in Settings. |
Settings
For controls used as destinations in DDE conversations, the settings for number are:
Constant | Setting | Description |
VbLinkNone | 0 | (Default) None — No DDE interaction. |
VbLinkAutomatic | 1 | Automatic — Destination control is updated each time the linked data changes. |
VbLinkManual | 2 | Manual — {Destination control is updated only when the LinkRequest method is invoked. |
VbLinkNotify | 3 | Notify — A LinkNotify event occurs whenever the linked data changes, but the destination control is updated only when the LinkRequest method is invoked. |
For forms used as sources in DDE conversations, the settings for number are:
Constant | Setting | Description |
VbLinkNone | 0 | (Default) None — No DDE interaction. No destination application can initiate a conversation with the source form as the topic, and no application can poke data to the form. If LinkMode is 0 (None) at design time, you can't change it to 1 (Source) at run time. |
VbLinkSource | 1 | Source — Allows any Label, PictureBox, or TextBox control on a form to supply data to any destination application that establishes a DDE conversation with the form. If such a link exists, Visual Basic automatically notifies the destination whenever the contents of a control are changed. In addition, a destination application can poke data to any Label, PictureBox, or TextBox control on the form. If LinkMode is 1 (Source) at design time, you can change it to 0 (None) and back at run time. |
Remarks
The following conditions also apply to the LinkMode property:
Note Setting a permanent data link at design time with the Paste Link command from the Edit menu also sets the LinkMode, LinkTopic, and LinkItem properties. This creates a link that is saved with the form. Each time the form is loaded, Visual Basic attempts to re-establish the conversation.