Board index » delphi » Screen grab excludes mouse cursor?

Screen grab excludes mouse cursor?

How can i make a screendump that includes the mouse cursor?

 

Re:Screen grab excludes mouse cursor?


Quote
> How can i make a screendump that includes the mouse cursor?

Cheat... :) Well that's how I did it anyway... It's fairly simple to do -
when you capture the screen (which is effectively a bitmap over which
windows / the graphics card driver overlays the mouse pointer), make a note
of the current mouse position and cursor shape. All you have to do next is
overlay this onto the bitmap you captured.

You won't see the NT2000 / XP mouse shading effects but the effect of the
mouse cursor will be there.

Nick

Re:Screen grab excludes mouse cursor?


Quote
>You won't see the NT2000 / XP mouse shading effects but the effect of the
>mouse cursor will be there.

unless you fake that too

Re:Screen grab excludes mouse cursor?


Try following code for an ordinary screenshot.

var Canvas : TCanvas;
      DC : HDC;
     Bitmap : TBitmap;
begin
    DC := GetDC(0); //Desktop handle
    Canvas := TCanvas.Create;
    Canvas.Handle := DC;

    Bitmap := TBitmap.Create;
    Bitmap.Width := Screen.Width;
    Bitmap.Height := Screen.Height;

    BitBlt(Bitmap.Canvas.Handle, 0, 0, Screen.Width, Screen.Height,
              Canvas.Handle, 0, 0, SRCCOPY);

    ReleaseDC(Canvas.Handle, DC);
    Canvas.Free;

    {*
      * Insert your code to save the Bitmap here.
    }
    Bitmap.free;

end;

Christian

Re:Screen grab excludes mouse cursor?


Quote
"Oscar" <khfdksj...@hotmail.com> wrote in message news:3bfa2184_1@dnews...

> How can i make a screendump that includes the mouse cursor?

The main purpose of the "Cursor Overlay" project was to add a cursor back
to a screen grabbed image:

http://homepages.borland.com/efg2lab/Graphics/CursorOverlay.htm

--
efg -- Earl F. Glynn, Overland Park, KS  USA
efg's Computer Lab Mirror:  http://homepages.borland.com/efg2lab

Re:Screen grab excludes mouse cursor?


Quote
> How can i make a screendump that includes the mouse cursor?

Check out www.ec-software.com and their TNT screen capture utility.

They also make an incredible image editor (Impict) and probably the best
help authoring tool (Help and Manual).

Olivier

Other Threads