Sumber Kode

PrintWindow Example - Delphi Source Code

  • delphibasics
  • Nov 19' 14
  • Delphi
  • 141
  • 273
  • United States
    Coder: counterstrikewi
    Compiled: Delphi 2007

This example shows you how to use the PrintWindow API to view the visual output of a window which may, or may not be visible on the screen.
It can therefore be used as an alternative to BitBlt for a more complete screenshot project.

MSDN - PrintWindow

The PrintWindow function copies a visual window into the specified device context (DC), typically a printer DC.

BOOL PrintWindow(
HWND hwnd,
HDC hdcBlt,
UINT nFlags


hwnd - A handle to the window that will be copied.
hdcBlt -
A handle to the device context.
nFlags -
The drawing options. It can be one of the following values:
                  nil - Entire Window is copied to hdcBlt
                PW_CLIENTONLY - Only the client area of the window is copied to hdcBlt.

Only Delphi source code is included in the archive.

Powered by
Pasar Kode Partner


  • Tags :
comments powered by Disqus

Kode Terkait

MiniReg - LightWeight TRegistry Replacement

Delete Self - Procedure to close and delete the current application

uFMOD Example - Play .xm files from disk, memory or resource.

Pngimage by Aphex - Create, convert to and edit .png images in delphi.

Crafting a PE File with Delphi - Creating a pe file from scratch.

Change resource strings at runtime.

Alternative Sleep Methods

Create a form with Windows API.

Drag and Drop

Retreive default browser path