|
DDE to
Visual Basic
This sample shows how to use
VB to provide more detailed functions than can be
incorporated inside the Minisoft scripting language. This
full sample source is available for download. [FTP]
Here is a script to use in a
Visual Basic application to return yesterday's date.
SHELL lastday.exe NOWAIT
WAIT 0:00:2
DISPLAY "^[H^[J"
DDE-INITIATE "lastday" "Date" V8
DDE-REQUEST V8 "Text1" V1
DISPLAY "Yesterday was: " & V1 & "^M^J"
DDE-EXECUTE V8 "Exit"
DDE-TERMINATE-ALL
END
Visual Basic source
for lastday application.
Dim ExitFlag As Boolean
Private Sub Exit_Click()
End
End Sub
Private Sub Form_LinkClose()
If ExitFlag Then End
End Sub
Private Sub Form_LinkExecute(CmdStr As String, Cancel As Integer)
If CmdStr = "Exit" Then ExitFlag = True
Cancel = False
End Sub
Private Sub Form_Load()
ExitFlag = False
Timer1_Timer
Me.Hide
End Sub
Private Sub Timer1_Timer()
Timer1.Interval = 0
Text1.Text = Format(Date - 1, "MMDDYY")
Timer1.Interval = 10000
End Sub
|