Sending DDE Commands to WinWedge from a VB6 App

Note: For a list of DDE commands, check out the support article listing WinWedge DDE Commands.

After a link is established between a text box and a data field in WinWedge, you could issue commands to WinWedge using the text box “LinkExecute Method”. For Example the following code sends the string “Testing” followed by a carriage return out the serial port.

Note: WinWedge must be active on the specified serial port for the following code to work.

Hot = 1 : Warm = 2 : Notify=3 : None = 0
Text2.linkmode = None ' disable links before setting topic
Text2.LinkTopic = "winwedge|com2" ' set the link topic
' there is no need to set the LinkItem property when sending DDE commands
Text2.LinkMode = Warm ' set the link mode to "Warm" or "Hot"
Text2.LinkExecute "[Sendout('Testing',13)]" ' send the string out the serial port

' The following line will close WinWedge if you uncomment it
'Text2.LinkExecute "[APPEXIT]"

Contact Us