如何获取计算机的屏幕截图 [英] How to get screenshot of Computers

查看:90
本文介绍了如何获取计算机的屏幕截图的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

亲爱的先生,

在这里,我正在做一个Windows应用程序,用于捕获LAN中计算机的屏幕截图.我正在获取计算机的屏幕截图.但我想在不同的图片框中显示局域网中所有计算机的屏幕.我不知道要这样做.所以请帮帮我.


谢谢
Sujith T.P

Dear Sir,

Here i am doing one windows application for capturing screen shot of comuters in a LAN.I am geting screen shot of computer. Bt i want to show the screen of all computers in LAN in different picture boxes. I am not getting any idea to do that. So please help me.


Thanks
Sujith T.P

推荐答案

如果需要,您可以不通过LAN进行操作,甚至可以通过Internet进行操作.如果防火墙可以阻止二进制协议,则使用LAN可以更快地完成操作.因此,关键是:您需要创建一个网络Windows服务,该服务可以通过网络对本地计算机进行截屏,然后将结果发送给客户端.

首先,如何制作屏幕截图?这是一个简单的代码示例: http://www.dotnetjalps.com /2007/06/how-to-take-screenshot-in-c.html [我如何将byte []发送到另一台PC [ ^ ],
在局域网上与两个Windows应用程序进行通信. [^ ].

这种服务的重要部分应该是多线程.您可以在我过去的其他解决方案中找到一些基本想法:
来自同一端口号的多个客户端 [通过服务器触发的自动更新程序 [ http://ASP.NET [ ^ ].使用ASP.NET的另一种轻量级选择是使用Apache,带有mod_mono的Mono,请参见:
http://en.wikipedia.org/wiki/Mono_%28software%29 [ ^ ],
http://www.mono-project.com/ [ http://en.wikipedia.org/wiki/Mod_mono [ http://www.mono-project.com/Mod_mono [
—SA
You can do it not over LAN but even of Internet if you want. With the LAN you can do it faster if firewalls can block binary protocols. So, the key is: you need to create a network Windows Service which can take a screen shot of its local computer on the request by network and send the result to the client.

First, how to make a screenshot? Here is a simple code sample: http://www.dotnetjalps.com/2007/06/how-to-take-screenshot-in-c.html[^]. You may want to make this code more robust to support multiple monitors.

Now, a network communication can be done on different levels; I provided overview of them in my past solutions:
how i can send byte[] to other pc[^],
Communication b/w two Windows applications on LAN.[^].

Important part of such Service should be multithreading. You can find some basic ideas in my other past solutions:
Multple clients from same port Number[^],
automatic updater triggered via server[^].

A client part could be a regular Windows Application, based on Forms or WPF.

There is one more interesting option: a Service can implement a custom HTTP service. In this case, your client could be a regular available Web browser. Alternatively, you can install IIS on each computer and write an ASP.NET application. Start with http://ASP.NET[^]. One more light-weight option using ASP.NET would be using Apache, Mono with mod_mono, see:
http://en.wikipedia.org/wiki/Mono_%28software%29[^],
http://www.mono-project.com/[^],
http://en.wikipedia.org/wiki/Mod_mono[^],
http://www.mono-project.com/Mod_mono[^].

With the approach using of HTTP Server, the client uses a Web browser, enter URL of a computer and gets an HTML page form the service. This page has a form with the button "Take a screenshot". A press on this button sends HTTP request to the service computer and receives a current screen shot of it generated on the server side, for downloading or on-screen viewing.

—SA


这篇关于如何获取计算机的屏幕截图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆