procedure TForm1.Button3Click(Sender: TObject);
var abmp:TBitMap;
screenDC : HDC;
begin
if mediaplayer1.Mode=mpPaused then
begin
Button3.Enabled:=true;
abmp := TBitMap.Create;
with abmp, Rect(panel1.ClientTOScreen(Point(0,0)).x,panel1.ClientTOScreen(Point(0,0)).y,
panel1.ClientTOScreen(Point(0,0)).x+panel1.width,
panel1.ClientTOScreen(Point(0,0)).y +panel1.Height)do
begin
width := right - left;
height := bottom - top;
screenDC:=GetDC(0);
try
bitblt(Canvas.handle,0,0,Width,Height,ScreenDC,Left,Top,SRCCOPY);
finally
ReleaseDC(0,ScreenDC);
end;
end;
image1.Picture.Assign(abmp);
if savedialog1.Execute then
begin
image1.Picture.SaveToFile(savedialog1.filename);
end;
end;
end