bmpmap1 := Tbitmap.Create;
dc := GetWindowDC(0);
can := TCanvas.Create;
can.Handle := dc;
bmpmap1.Width := screen.Width;
bmpmap1.Height := screen.Height;
bmpmap1.Canvas.CopyRect(Rect(0, 0, screen.Width, screen.Height), can, Rect(0, 0, screen.Width, screen.Height));
releaseDC(0, DC);
can.Handle := 0;
can.Free;
bmpmap1.SaveTofiles('a.bmp');