屏幕捕获错误 [英] Error in screen capture
本文介绍了屏幕捕获错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
这是我编写的用于捕获屏幕(tabletable Google地图)的代码,但是它在var activeX中没有任何价值,并显示错误"null is null object" ...是否有解决方案?
This s the code i had written to capture a screen(a tablegoogle map) but it is getting no value in var activeX and showing error "null is a null object"...Is there any solution?
function CaptureScreen() {
try {
var activeX = new ActiveXObject("ActiveX.ExeActivator");
document.parentWindow.moveTo(0, 0);
document.parentWindow.resizeTo(document.parentWindow.screen.width, document.parentWindow.screen.height);
var table = document.getElementById("tblGoogleMap");
var x = document.parentWindow.screenLeft + table.getClientRects()[0].left;
var y = document.parentWindow.screenTop + table.getClientRects()[0].top;
var width = table.offsetWidth;
var height = table.offsetHeight;
// //var activeX = new ActiveXObject("ScreenCaptureActiveX.ScreenCapture");
// // activeX.CaptureScreen(x, y, width, height);
}
catch (ex) {
if (ex.message == "Automation server can't create object") {
$find("mpInstallActivex").show();
}
else {
alert("Message : " + ex.message + " Description : " + ex.description);
}
}
}
推荐答案
find(" ).show(); } 其他 { alert(" + ex.message + " 说明:" + ex.description); } } }
find("mpInstallActivex").show(); } else { alert("Message : " + ex.message + " Description : " + ex.description); } } }
请参阅此文章,可能会对您有所帮助
http://www.farooqazam.net/screen-capture-application-using-c-sharp / [^ ]
Refer this article, might help you
http://www.farooqazam.net/screen-capture-application-using-c-sharp/[^]
感谢您,我找到了c#屏幕捕获的解决方案.请转到 TeboScreen:基本的C#屏幕捕获应用程序以查看该文章.
Thanks to you i found a solution for c# screen capture.Go to TeboScreen: Basic C# Screen Capture Application to see the article.
这篇关于屏幕捕获错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文