Muchísimas gracias a ambos ![:) :)](https://forum.elhacker.net/Smileys/navidad/smiley.gif)
Voy a echarle un vistazo más detenidamente, pero tiene muy buena pinta.
![:) :)](https://forum.elhacker.net/Smileys/navidad/smiley.gif)
Voy a echarle un vistazo más detenidamente, pero tiene muy buena pinta.
Esta sección te permite ver todos los mensajes escritos por este usuario. Ten en cuenta que sólo puedes ver los mensajes escritos en zonas a las que tienes acceso en este momento.
Mostrar Mensajes Menú public static Bitmap CapturarPantalla(IntPtr pHandle)
{
Bitmap bmp = new Bitmap(GetSystemMetrics(0), GetSystemMetrics(1));
Graphics memoryGraphics = Graphics.FromImage(bmp);
IntPtr dc = memoryGraphics.GetHdc();
bool vCapturo = PrintWindow(pHandle, dc, 0);
memoryGraphics.ReleaseHdc(dc);
memoryGraphics.Dispose();
return bmp;
}
public static Bitmap GetWindow(IntPtr hWnd)
{
Bitmap bmp = null;
IntPtr hdc = GetDC(hWnd);
if ((int)hdc != 0)
{
IntPtr hdcMem = CreateCompatibleDC(hdc);
if ((int)hdcMem != 0)
{
IntPtr hbitmap = CreateCompatibleBitmap(hdc, GetSystemMetrics(0), GetSystemMetrics(1));
if ((int)hbitmap != 0)
{
SelectObject(hdcMem, hbitmap);
if (PrintWindow(hWnd, hdcMem, 1))
{
bmp = System.Drawing.Image.FromHbitmap(hbitmap);
}
}
DeleteObject(hbitmap);
}
DeleteObject(hdcMem);
}
ReleaseDC(hWnd, hdc);
return bmp;
}