تقييم الموضوع :
  • 0 أصوات - بمعدل 0
  • 1
  • 2
  • 3
  • 4
  • 5
مكتبة أكواد التطوير على منصات ال Windows Mobile
#1
كاتب الموضوع : Boutemine Oualid

بسم الله الرحمن الرحيم

هنا سأبدا ان شاء الله بوضع جميع الشيفرات المصدرية التي أملكها لتطبيقات ال Pocket PC و المعمولة على منصة ال Windows Mobile 6
أرجو من الجميع أن يشاركنا بالشفرات التي يملكها


الشفرة الأولى: التقاط صورة سطح المكتب ScreenShot

كود :
// P/Invoke declaration
[DllImport("coredll.dll")]
public static extern int BitBlt(IntPtr hdcDest, int nXDest, int nYDest, int nWidth, int nHeight, IntPtr hdcSrc, int nXSrc, int nYSrc, uint dwRop);
const int SRCCOPY = 0x00CC0020;
private void Snapshot(string fileName)
{
Graphics gx = this.CreateGraphics();
Rectangle rect = Screen.PrimaryScreen.Bounds;
Bitmap bmp = new Bitmap(rect.Width, rect.Height);
Graphics gxComp = Graphics.FromImage(bmp);
// Get the photo.
BitBlt(gxComp.GetHdc(), 0, 0, rect.Width, rect.Height, gx.GetHdc(), rect.Left, rect.Top, SRCCOPY);
// Save the picture to a file.
bmp.Save(fileName, System.Drawing.Imaging.ImageFormat.Bmp);
// Cleanup
bmp.Dispose();
gxComp.Dispose();
}
}}}
تم الشكر بواسطة:



التنقل السريع :


يقوم بقرائة الموضوع: بالاضافة الى ( 1 ) ضيف كريم