Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Public Sub HandleDesktopInfo(ByVal client As ServerClient, ByVal bytes As Byte())
- If PictureBox1.Image IsNot Nothing Then
- PictureBox1.Image.Dispose())
- End If
- Dim ms As New IO.MemoryStream(bytes)
- Dim bmp = New Drawing.Bitmap(ms)
- PictureBox1.Image = bmp
- ms.Dispose()
- fps += 1
- End Sub
- If PictureBox1.Image IsNot Nothing Then
- PictureBox1.BeginInvoke(Sub() PictureBox1.Image.Dispose())
- End If
- Dim newimage As Bitmap = PictureBox1.Image
- Dim ms As New IO.MemoryStream(bytes)
- Dim bmp = New Drawing.Bitmap(ms)
- PictureBox1.Image = bmp
- ms.Close()
- ms.Dispose()
- If newimage IsNot Nothing Then
- newimage.Dispose()
- End If
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement