AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Zurück Delphi-PRAXiS Sprachen und Entwicklungsumgebungen Object-Pascal / Delphi-Language Delphi Screenshot Windows 7 Win Server 2008 R' taskbar extension
Thema durchsuchen
Ansicht
Themen-Optionen

Screenshot Windows 7 Win Server 2008 R' taskbar extension

Ein Thema von Gate · begonnen am 25. Apr 2014
Antwort Antwort
Gate

Registriert seit: 23. Dez 2011
1 Beiträge
 
#1

Screenshot Windows 7 Win Server 2008 R' taskbar extension

  Alt 25. Apr 2014, 15:37
Delphi-Version: XE3
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: http://msdn.microsoft.com/en-us/libr...(v=vs.85).aspx

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;

Geändert von Gate (25. Apr 2014 um 16:19 Uhr)
  Mit Zitat antworten Zitat
Antwort Antwort


Forumregeln

Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are aus

Gehe zu:

Impressum · AGB · Datenschutz · Nach oben
Alle Zeitangaben in WEZ +1. Es ist jetzt 14:37 Uhr.
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz