如何将打印屏幕转换为图像 [英] How to convert print screen to image

查看:103
本文介绍了如何将打印屏幕转换为图像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

protected void btn_Click(object sender, EventArgs e)
        {
            System.Drawing.Image screenshot = Clipboard.GetImage();
            screenshot.Save(@"C:\Amal\Project Source\MR\MRCoding\MRDataEntry\Files\ScreenShot\1.jpg", ImageFormat.Jpeg);
        }





Clipboard.GetImage()仅返回nulll值



任何想法?



Clipboard.GetImage() return only nulll value

any idea?

推荐答案

ASP.NET代码在服务器上运行。服务器无法访问客户端侧的剪贴板。您可以尝试使用客户端代码来实现此目的。

查看以下链接,你可以将剪贴板图像传递到网页

http ://jsfiddle.net/bt7BU/104/ [ ^ ]

了解更多信息: http://stackoverflow.com/questions/6333814/how-does-the-paste-image-from-clipboard-functionality-work-in-gmail-and-google-c [ ^ ]
ASP.NET code is run on server. Server con't access client side Clipboard. You may try one to use client side code for this purpose.
check below link, you can past clip board image to a web page
http://jsfiddle.net/bt7BU/104/[^]
for more information :http://stackoverflow.com/questions/6333814/how-does-the-paste-image-from-clipboard-functionality-work-in-gmail-and-google-c[^]


这篇关于如何将打印屏幕转换为图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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