Quote Originally Posted by jmcilhinney View Post
The point of calling Encoding.GetBytes is to convert a String to a Byte array. You're not using Strings so you don't use that method at all, especially not to pass a Byte array in. As you can see from then existing code, you get the Byte array from the original data and then you write it to the stream. Your original data is an Image. Get a Byte array from that and then write it to the stream.
I thought that was what I was trying to. Here is my code to generate the byte array:
Code:
picScreenCapture.Image = CropImage
Dim ms As New MemoryStream
CropImage.Save(ms, System.Drawing.Imaging.ImageFormat.Jpeg)

Dim arrImage() As Byte
arrImage = ms.GetBuffer

For Each recipient In arListOfRecipients
    Dim arElements As String() = recipient.ToString.Split(New String() {":"}, StringSplitOptions.None)
    Dim tmpIP As String = arElements(0)
    Dim tmpPort As Integer = arElements(1)
                
   IMGserver.Send(tmpIP, tmpPort, arrImage)
Next
but using this generates the error in post 271.

I don't really understand how get the code to use the different instances of MessageServer.