PowerTCP Emulation for .NET
Write(String) Method
Example 




The data to display.
Displays data contained within a string in the Vt window and interprets all escape sequences.
Syntax
Public Overloads Sub Write( _
   ByVal data As String _
) 
Dim instance As Vt
Dim data As String
 
instance.Write(data)
public void Write( 
   string data
)
public: void Write( 
   string* data
) 
public:
void Write( 
   String^ data
) 

Parameters

data
The data to display.
Remarks

Use this overload to process data received from a host, or VT formatted data from a file or other data source when no encoding is required.

Example
The following example demonstrates how to get information about a cell in the display.
private void writeToDisplay(System.IO.MemoryStream stream)
{
    //Read data into a byte array
    stream.Position = 0;
    byte[] data = new byte[stream.Length];
    stream.Read(data, 0, (int)stream.Length);

    //Write a byte array
    vt1.Write(data);

    //Write a byte array with offset and count
    vt1.Write(data, 0, data.Length);

    //Write a string
    vt1.Write(System.Text.Encoding.Default.GetString(data, 0, data.Length));
}
Private Sub writeToDisplay(ByVal stream As System.IO.MemoryStream)
	'Read data into a byte array
	stream.Position = 0
	Dim data() As Byte = New Byte(stream.Length - 1){}
	stream.Read(data, 0, CInt(Fix(stream.Length)))

	'Write a byte array
	vt1.Write(data)

	'Write a byte array with offset and count
	vt1.Write(data, 0, data.Length)

	'Write a string
	vt1.Write(System.Text.Encoding.Default.GetString(data, 0, data.Length))
End Sub
See Also

Reference

Vt Class
Vt Members
Overload List


PowerTCP Emulation for .NET Documentation Version 4.7
© 2018 Dart Communications. All Rights Reserved.
Send comments on this topic