Sub Globals
Dim imgCrt As ImageView
:
:
End Sub
'AStreams_NewData() Process message received on AsyncStream from socket
Sub AStreams_NewData (Buffer() As Byte)
'Check for CRT image From record type in header (first byte of message)
If Buffer(0) = ImageCrtRec Then
'Message header in first 4 bytes of stream.
'Copy image data from input buffer starting at 5th byte
Dim InputStream1 As InputStream
InputStream1.InitializeFromBytesArray(Buffer, 4, Buffer.Length-4)
'Read stream into image view
Dim Bitmap1 As Bitmap
Bitmap1.Initialize2(InputStream1)
imgCrt.Bitmap = Bitmap1
End If
End Sub