|
<< Click to Display Table of Contents >> Manual > Server Creation Guide > Interface > DDE Interface > DDE connection from VisualBasic.NET > Step 3: Reading and writing values |
Step 3: Reading and writing values
We will introduce how to read and write item values at any time.
Import
Item values can be read at any time. Reading is done with "FnDdeRequest".
In the sample, the value is read by pressing the Read button.

'------------------------------------------
' DDE Read
'------------------------------------------
Private Sub btRead_Click(sender As System.Object, e As System.EventArgs) Handles btRead.Click
Dim vItemName As String = txItemName1.Text
txRead.Text = FnDdeRequest(mvConv, vItemName)
End Sub
write
Write the item value at any time. Read it with "FnDdePoke".
In the sample, the value is written by pressing the Write button.

'------------------------------------------
' DDE Write
'------------------------------------------
Private Sub btWrite_Click(sender As System.Object, e As System.EventArgs) Handles btWrite.Click
Dim vItemName As String = txItemName2.Text
FnDdePoke(mvConv, vItemName, txWrite.Text)
End Sub
|
Among the code written in the Common class (Common.vb), the important methods are as follows:
|