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

实现桌面共享

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

通过TCP/IP协议,截屏的方式,广播发送桌面图片实现桌面共享 C#多媒体编程-第1张

private Bitmap GetScreenShot() { Bitmap bmp = new Bitmap(Screen.PrimaryScreen.Bounds.Width, Screen.PrimaryScreen.Bounds.Height, System.Drawing.Imaging.PixelFormat.Format32bppArgb); Graphics g = Graphics.FromImage(bmp); g.CopyFromScreen(Screen.PrimaryScreen.Bounds.X, Screen.PrimaryScreen.Bounds.Y, 0, 0, Screen.PrimaryScreen.Bounds.Size, CopyPixelOperation.SourceCopy); return bmp; } private void Startlistener() { TcpListener listener = new TcpListener(port); listener.Start(); while (true) { if (isFormClosed) { return; } try { TcpClient client = listener.AcceptTcpClient(); if (clientList.Count < maxConnections) { clientList.Add(client); } else { client.Close(); } } catch (Exception ex) { this.Text = ex.Message; } } }

评论

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


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

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