joe_pool_is
Contributor
Could anyone give me some information on how to screen capture on a Pocket PC or Windows Mobile device using Visual Studio (i.e Managed Code)?
I written code to do it in the past using eMbedded VC, but very little of this will port over to VS.
I've got working code for C# WinForms, except that it uses SendKeys (see code below). Unfortunately, SendKeys is not a part of the Compact Framework.
Here's the method I'm trying to make, if it helps:
I'm trying to create tutorials for my CE Apps, and it would sure be nice if I could write screen capturing calls in my code whenever key events happen.
Is there an alternative to capturing the screen to the Clipboard besides SendKeys?
Thanks for any help!
I written code to do it in the past using eMbedded VC, but very little of this will port over to VS.
I've got working code for C# WinForms, except that it uses SendKeys (see code below). Unfortunately, SendKeys is not a part of the Compact Framework.
Here's the method I'm trying to make, if it helps:
C#:
private Bitmap m_bmp;
public Bitmap PrintScreen()
{
SendKeys.SendWait("%{PRTSC}%"); // SendKeys is not defined!
IDataObject ido = Clipboard.GetDataObject();
if (ido.GetDataPresent(DataFormats.Bitmap) == true)
{
m_bmp = (Bitmap)ido.GetData(DataFormats.Bitmap);
string filename = "Bitmap_"
+ DateTime.Now.ToFileTimeUtc().ToString()
+ ".bmp";
m_bmp.Save(filename, Imaging.ImageFormat.Bmp);
}
}
Is there an alternative to capturing the screen to the Clipboard besides SendKeys?
Thanks for any help!