منتدى فيجوال بيسك لكل العرب | منتدى المبرمجين العرب
[سؤال] how to send file with progressbar via TcpClient ? - نسخة قابلة للطباعة

+- منتدى فيجوال بيسك لكل العرب | منتدى المبرمجين العرب (http://vb4arb.com/vb)
+-- قسم : قسم لغة الفيجوال بيسك VB.NET (http://vb4arb.com/vb/forumdisplay.php?fid=182)
+--- قسم : قسم اسئلة VB.NET (http://vb4arb.com/vb/forumdisplay.php?fid=183)
+--- الموضوع : [سؤال] how to send file with progressbar via TcpClient ? (/showthread.php?tid=39646)



how to send file with progressbar via TcpClient ? - الماجيك مسعد - 06-10-21

كود :
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