Questions? Search our site or call us at 1-800-722-6004

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"

Categories: Macro / Code Sample, Visual Basic 6.0, C/C++, .NET, Data Collection, Serial (RS232), WinWedge

Last Updated: 2013.08.30

Need more help?

Don't hesitate to call or email us with your questions

Our office is open 9AM - 5PM Monday Through Friday (E.S.T.)

Technical Support: 215-496-0202

Toll-Free: 1 (800) 722-6004
Skype: taltech1 (Voice only)
Email: support@TALtech.com