I haven't created a datareceived event handler because i am quite new to vb and not sure how to. At the moment, the code on the client side is exactly the same as your example on the first page but has the code in my previous post in the messagereceived sub. So it looks like:
I have read the examples for file transfers on the thread you mentioned and am wondering if I would be able to add the FileTransferSend class to the server and the FileTransferReceive class to the client. Could I send a message from the client to the server requesting it to start the FileTransferSend and then start the FileTransferReceive for the client. I am assuming the file transfer classes would have to use a different port to connect.Code:Private Sub messageReceived(ByVal message As String) Dim c() As Char = message.ToCharArray Dim d() As Byte = System.Text.Encoding.Default.GetBytes(c) My.Computer.FileSystem.WriteAllBytes("C:\image.jpg", d, False) End Sub
EDIT: I managed to get it working using your example on the thread you suggested. It works perfectly. Thank you for all your help.




Reply With Quote