Linking a VB 6 Text Box to a WinWedge Data Field

To link a data field in the Wedge to a text box in a VB application you simply set the properties for the text box to specify a DDE link. For example the following code would establish a “Hot” link between field(1) in the Wedge (active on COM2) so that whenever data changes in Field(1) of the Wedge, it would also automatically change in the text box Text1. When a data field from the Wedge is linked to a text box on a VB form using a “Hot” link, the text box will also receive a “Change” event whenever the data from the Wedge changes. If you set the LinkMode property to “Notify”, the text box will receive a “LinkNotify” event whenever the Wedge updates the data for Field(1) – even if the data does not change. Note: If you set the LinkMode to “Notify” your Text1_LinkNotify event handler will have to perform a “LinkRequest” method to update the textbox. (i.e. Text1.LinkRequest)

 Hot = 1 : Warm = 2 : Notify=3 : None = 0
Text1.LinkTopic = "winwedge|com2" ' set the link topic
Text1.LinkItem = "field(1)" ' set the link item
Text1.LinkMode = Hot ' set the link mode to "Hot"

Contact Us