Windows Phone 7 - 截屏 [英] Windows Phone 7 - Capture Screen
问题描述
我正在尝试在 Windows Mobile 应用程序运行时捕获屏幕.到目前为止,我已经有了这个,但我一直收到 参数不正确
的 ArgumentException.我做错了什么?
I am trying to capture the screen whilst my windows mobile application is running. I have this so far but I keep getting an ArgumentException of The parameter is incorrect
. What am I doing wrong?
WriteableBitmap wb = new WriteableBitmap((int)this.ActualWidth, (int)this.ActualHeight);
wb.Render(this, null);
wb.Invalidate();
MemoryStream ms = new MemoryStream();
int h = 212;
int w = 444;
wb.SaveJpeg(ms, w, h, 0, 100); // The parameter is incorrect
BitmapImage bitmapImage = new BitmapImage();
bitmapImage.SetSource(ms);
image1.Source = bitmapImage;
以上内容在我的 MainPage 构造函数中.
The above is within my MainPage constructor.
我设法使用了 Matt 推荐的很棒的教程.
I managed to make use the great tutorial suggested by Matt.
但是,它似乎没有从 WebBrowser
中捕获任何内容.
However, it doesn't seem to capture anything from the WebBrowser
.
1) 有谁知道本机电子邮件应用程序如何呈现 HTML 电子邮件 - 它使用什么组件?
1) Does anyone know how the native email application renders HTML email - what component does it use?
2) Windows Phone 7 系列中使用什么创建本机应用程序?
2) What is used to create the native applications in the Windows Phone 7 series?
推荐答案
这是 Jeff Wilcox 刚刚发布的另一个解决方案
Here's another solution just published by Jeff Wilcox
它会按您指定的时间间隔捕获屏幕截图,然后将它们保存到 IndependentStorage.
It captures screenshots at intervals you specify and then saves them to IsolatedStorage.
这篇关于Windows Phone 7 - 截屏的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!