Moderator: Moderator Group
Imports System.IO
Imports System.Net
Imports System.Net.Sockets
Imports System.Threading
Imports System.Drawing
Imports System.Runtime.Serialization.Formatters.Binary
Public Class frm_Client
Dim client As New TcpClient
Dim nstream As NetworkStream
Public Function Desktop() As Image
Dim bounds As Rectangle = Nothing
Dim screenshot As System.Drawing.Bitmap = Nothing
Dim graph As Graphics = Nothing
bounds = Screen.PrimaryScreen.Bounds
screenshot = New Bitmap(bounds.Width, bounds.Height, System.Drawing.Imaging.PixelFormat.Format32bppArgb)
graph = Graphics.FromImage(screenshot)
graph.CopyFromScreen(bounds.X, bounds.Y, 0, 0, bounds.Size, CopyPixelOperation.SourceCopy)
Return screenshot
End Function
Private Sub SendImage()
Dim bf As New BinaryFormatter
nstream = client.GetStream
bf.Serialize(nstream, Desktop())
End Sub
Private Sub Timer1_Tick(sender As System.Object, e As System.EventArgs) Handles Timer1.Tick
SendImage()
End Sub
Private Sub Button1_Click(sender As System.Object, e As System.EventArgs) Handles Button1.Click
Try
client.Connect("192.168.1.13", 1250)
Catch ex As Exception
MsgBox("Failed to connect...")
End Try
Timer1.Start()
End Sub
Private Function GetCRC32(p1 As Object, p2 As Integer) As Object
Throw New NotImplementedException
End Function
End Class
alverman wrote:StreamiX Desktop Rev 1 for mac please
Users browsing this forum: No registered users and 7 guests