找传奇、传世资源到传世资源站!

C# 基于TCP的屏幕远程监控

8.5玩家评分(1人评分)
下载后可评
介绍 评论 失效链接反馈

基于TCP协议的远程屏幕监控两台以上客户端的远程屏幕程序设计from clipboard

public void getRemote3()        {            IPAddressip = IPAddress.Parse("127.0.0.1");            tcp = new TcpListener(ip, 8083);            tcp.Start();            socket =tcp.AcceptSocket();            ns = new NetworkStream(socket);            sr = new StreamReader(ns);            sw = new StreamWriter(ns);             if(socket.Connected)            {                try                {                    while (true)                    {                        byte[] b = new byte[1024 * 256];//设置接收大小                        int i = this.socket.Receive(b);//接收                        //把byte[]转化成内存流,再把内存流转化成Image                        System.Drawing.Image myimage =System.Drawing.Image.FromStream(new MemoryStream(b));                        PB5.Image =myimage;//显示                        this.PB5.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;                        //MessageBox.Show("显示成功!server");                     }                }                catch (Exceptionex)                {                    this.tcp.Stop();                    MessageBox.Show("4号窗口捕获捕获屏幕出错!server" ex.Message);                }            }        }

评论

发表评论必须先登陆, 您可以 登陆 或者 注册新账号 !


在线咨询: 问题反馈
客服QQ:174666394

有问题请留言,看到后及时答复