MATLAB REAL-TIME WORKSHOP 7 - TARGET LANGUAGE COMPILER Bedienungsanleitung Seite 316

  • Herunterladen
  • Zu meinen Handbüchern hinzufügen
  • Drucken
  • Seite
    / 408
  • Inhaltsverzeichnis
  • LESEZEICHEN
  • Bewertet. / 5. Basierend auf Kundenbewertungen
Seitenansicht 315
7 ActiveX and DDE Support
7-30
Sub TextInput_KeyPress(KeyAscii As Integer)
rem If the user presses the return key
rem in the TextInput control.
If KeyAscii = vbKeyReturn then
rem Initiate the conversation between the TextInput
rem control and MATLAB under the Engine topic.
rem Set the item to EngEvalString.
TextInput.LinkMode = vbLinkNone
TextInput.LinkTopic = "MATLAB|Engine"
TextInput.LinkItem = "EngEvalString"
TextInput.LinkMode = vbLinkManual
rem Get the current string in the TextInput control.
rem This text is the command string to send to MATLAB.
szCommand = TextInput.Text
rem Perform DDE Execute with the command string.
TextInput.LinkExecute szCommand
TextInput.LinkMode = vbLinkNone
rem Initiate the conversation between the TextOutput
rem control and MATLAB under the Engine topic.
rem Set the item to EngStringResult.
TextOutput.LinkMode = vbLinkNone
TextOutput.LinkTopic = "MATLAB|Engine"
TextOutput.LinkItem = "EngStringResult"
TextOutput.LinkMode = vbLinkManual
rem Request the string result of the previous EngEvalString
rem command. The string ends up in the text field of the
rem control TextOutput.text.
TextOutput.LinkRequest
TextOutput.LinkMode = vbLinkNone
End If
End Sub
Seitenansicht 315
1 2 ... 311 312 313 314 315 316 317 318 319 320 321 ... 407 408

Kommentare zu diesen Handbüchern

Keine Kommentare