How can I get the image of ImageEnView screen display part?
Like this Code:
Var
bmpscreen:Tbitmap;
FullscreenCanvas:TCanvas;
dc:HDC;
sourceRect, destRect: TRect;
a,b,c,d:Integer;
Begin
a:=0;
b:=0;
c:=ImageEnView1.Width;
d:=ImageEnView1.Height;
dc:=getdc(Self.ImageEnView1.Handle);
fullscreencanvas:=Tcanvas.Create;
bmpscreen:=Tbitmap.create;
Try
fullscreencanvas.Handle:=dc;
bmpscreen.Width :=c-a;
bmpscreen.Height :=d-b;
sourcerect:=rect(0,0,c-a ,d-b );
destrect:= rect(a,b,c,d);
bmpscreen.Canvas.CopyRect(sourcerect,fullscreenCanvas,destrect);
ImageEnView2.IEBitmap.CopyFromTBitmap(bmpscreen);
ImageEnView2.Update;
Finally
bmpscreen.Free;
FullscreenCanvas.Free;
ReleaseDC(Self.ImageEnView1.Handle, DC);
End;