![]() |
Delphi-Version: XE3
Screenshot Windows 7 Win Server 2008 R' taskbar extension
Hi,
Windows 7, right click the System menu. I want to take a screenshot of the menu. Thumbnail Bar or Customizing Jump List or Jump List Example: ![]() I need help in this regard. Thanks to everyone in advance
Delphi-Quellcode:
procedure TForm1.Button1Click(Sender: TObject);
var I: integer; b: TBitMap; begin fwin := True; while True do begin if fwin = FALSE then exit; b := TBitMap.Create; try Application.ProcessMessages; Sleep(100); // ScreenShot(0, 0, 1364, 768, b); Capture(1364, 768,b); Image1.Picture.Assign(b); finally b.Free; end; end; end; function TForm1.Capture(Width, Height: integer;bm: TBitMap): Boolean; var dc: HDC; RasterOp, ExStyle: DWORD; begin result := FALSE; if ((Width = 0) or (Height = 0)) then exit; bm.Width := Width; bm.Height := Height; RasterOp := SRCCOPY; ExStyle := GetWindowLong(Handle, GWL_EXSTYLE); if (ExStyle and WS_EX_LAYERED) = WS_EX_LAYERED then RasterOp := SRCCOPY or CAPTUREBLT; dc := GetDCEx(0, 0, DCX_WINDOW or DCX_NORESETATTRS or DCX_CACHE); //dc := GetDCEx(0, 0, DCX_WINDOW or DCX_NORESETATTRS or DCX_CACHE or DCX_CLIPCHILDREN or DCX_CLIPSIBLINGS or DCX_PARENTCLIP or DCX_EXCLUDERGN or //DCX_INTERSECTRGN or DCX_EXCLUDEUPDATE or DCX_INTERSECTUPDATE or DCX_LOCKWINDOWUPDATE or DCX_VALIDATE); //dc := GetWindowDC(GetDesktopWindow); if (dc = 0) then exit; try SelectClipRgn(bm.Canvas.Handle, FRgn); result := BitBlt(bm.Canvas.Handle, 0, 0, 1320, 768, dc, 0, 0, RasterOp); SelectClipRgn(bm.Canvas.Handle, 0); finally ReleaseDc(0, dc); // ReleaseDC(GetDesktopWindow, dc); end; end; |
Alle Zeitangaben in WEZ +1. Es ist jetzt 07:40 Uhr. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz