So I have a remote desktop view program and it'll start, but once you click stop on the client side it'll stop. Later once you want to view them again you connect... you press start and the program crashes. So I stop and view were the code it at on the client and it's here.
So the server side isn't closing it's connection from the last session. How do I close it?
Code the server uses to send images.
Code
While client.Connected = True
nstream = client.GetStream
PictureBox1.Image = bf.Deserialize(nstream)
End WhileSo the server side isn't closing it's connection from the last session. How do I close it?
Code the server uses to send images.
Code
If Not client.Connected Then
client.Connect("192.168.1.66", port2)
End If
thread2 = New Thread(AddressOf TMR)
thread2.Start()Code
Public Sub TMR()
Try
T.Start()
Catch ex As Exception
End Try
End SubCode
Sub TElapsed() Handles T.Elapsed
SendImage()
End SubCode
Private Sub SendImage()
Dim bf As New BinaryFormatter
nstream = client.GetStream
bf.Serialize(nstream, Desktop())
End Sub
