Disculpen si los enrede un poco en el post de arriba, pero ya logre capturar cada monitor de forma independiente, gracias a
escafandra, hice una simplificacion del codigo y otros pequeños cambios y asi es como quedo:
Código Delphi
[-]
function monitortobmp(pantalla:TMonitor);
var
DC:HDC;
bmp, hbmp:HBitMap;
mw, mh, mt, ml:integer;
imagen:TBitMap;
mirror:boolean;
begin
mw:=pantalla.Width;
mh:=pantalla.Height;
mt:=pantalla.Top;
ml:=pantalla.Left;
mirror:=false;
if pantalla.MonitorNum <> 0 then
begin
if mt = 0 then
begin
mirror:=true;
ShowMessage('El monitor '+inttostr(pantalla.MonitorNum+1)+' no existe o es un espejo');
end;
end;
if not mirror then
begin
DC:=CreateCompatibleDC(0);
bmp:=CreateCompatibleBitmap(GetDC(0), mw, mh);
hbmp:=SelectObject(DC,bmp);
BitBlt(DC, 0, 0, mw, mh, GetDC(0), ml,mt, SRCCOPY + $40000000);
SelectObject(DC, hbmp);
DeleteObject(DC);
imagen:=TBitMap.Create;
imagen.Handle:=bmp;
imagen.SaveToFile('pantalla.bmp');
imagen.Free;
end;
end;
luego pueden saber si hay mas de un monitor disponible con:
y llamar a la funcion asi:
Código Delphi
[-]monitortobmp(screen.Monitors[x].Handle);
donde x es el numero del monitor al que quieran capturar
espero les sirva a todos, saludos.