LinkNotify Event

See Also1L5DPZM              Example0DNLEX>Low

Applies To

Label3MNIZ8D, picture box31MYIWX, text boxYPYZDG.

Description

Occurs when the sourceO9K12R has changed the data defined by the DDEDEFDDE link, if the LinkModeM1RK6S property of the destinationHF8UZ8 control is set to 3 (Notify).

Syntax

Sub ctlname_LinkNotify (Index As Integer)

Remarks

The argument Index uniquely identifies a control if it is in a control array8G7Y0UU.  Typically, in the LinkNotify event your code notifies the user, gets the new data immediately, or defers getting the data until later.  You can use the LinkRequest3HB029 method to obtain the new data from the source.


See Also

Help:

Attaching an Event Procedure to a Form or Control2LBGK4C

LinkClose Event17O5TU0

LinkError EventEGZX07

LinkExecute Method0JJE0GF

LinkMode PropertyM1RK6S

LinkOpen EventM1TL81

LinkRequest Method3HB029

LinkTopic PropertyEVWV3S

Using DDEHOWDDE

 

Programmer's Guide:

Chapter 20, "Communicating with Other Applications"


LinkNotify Event Example

The example is attached to a picture box control, Picture1, which has its LinkMode property set to 3 (Notify) and its LinkTopic and LinkItem properties set to specify picture data in the source.  When the source changes this data, the procedure updates the picture box immediately only if the picture box is on the active form (the form that has the focus); otherwise it sets a flag variable.  The example is for illustration only.

Sub Picture1_LinkNotify ()

   If Screen.ActiveForm Is Me Then

   Picture1.LinkRequest      ' Picture is on active form, so update.

   Else

      NewDataFlag = True     ' Assumed to be a module-level variable.

   End If

End Sub