منتدى فيجوال بيسك لكل العرب | منتدى المبرمجين العرب

نسخة كاملة : how to send file with progressbar via TcpClient ?
أنت حالياً تتصفح نسخة خفيفة من المنتدى . مشاهدة نسخة كاملة مع جميع الأشكال الجمالية .
كود :
Dim ns As NetworkStream
                 ns = cli.GetStream
                 Dim bytes() As Byte = New Byte(cli.ReceiveBufferSize - 1) {}
                Dim i As Integer = 0
                 Do While cli.GetStream.DataAvailable = True
                    bytes(i) = cli.GetStream.ReadByte()
                    i += 1
                    'msg = System.Text.Encoding.ASCII.GetString(bytes, 0, i)
                    'Form3.ProgressBar1.Value = cli.Available / i * 100
                Loop

i will send by client to server
server and client work on my pc for test
so i want send file by client
and receved it by server and progressbar will be in server form