Specifications

DDE reference
192
Glink: API reference manual Gallagher & Robertson
Begin Label sproc
BorderStyle = 1 'Fixed Single
Height = 495
Left = 1440
TabIndex = 9
Top = 4680
Width = 1215
End
Begin Label smemk
BorderStyle = 1 'Fixed Single
Height = 495
Left = 1440
TabIndex = 8
Top = 4080
Width = 1215
End
Begin Label sname
BorderStyle = 1 'Fixed Single
Height = 495
Left = 1440
TabIndex = 7
Top = 3480
Width = 1215
End
Begin Menu mnuFile
Caption = "File"
Begin Menu mnurunscr
Caption = "Run script..."
End
Begin Menu mnuclose
Caption = "Exit"
End
End
Begin Menu mnuGlink
Caption = "Glink"
Begin Menu mnuConn
Caption = "Connect"
End
Begin Menu mnuHalt
Caption = "Halt"
End
End
End
Sub breakbutton_Click ()
' Come here when the commandbutton named "breakbutton" is pressed
' on the main form. This uses the DDE LinBrk LinkPoke function
' to send a break to the host.
worktext.LinkTopic = "GL|GLINK"
worktext.LinkItem = "LinBrk"
worktext.LinkMode = COLD
worktext.Text = "Send Break"
worktext.LinkPoke
sendstuff.Text = ""
sendstuff.SetFocus
End Sub
Sub Form_Load ()
' This procedure gets invoked when the main form of the application
' is loaded. It attempts to establish a hot link to Glink. If this
' fails with the error DDE_NO_APP, meaning the target application was
' not currently running, then this procedure starts Glink and reattempts
' to establish the hot link. See the subroutine recvstuff_change which
' asynchronously handles arrival of data from the host.
Const DDE_NO_APP = 282, NONE = 0, COLD = 2, HOT = 1
On Error GoTo startit