AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Zurück Delphi-PRAXiS Sprachen und Entwicklungsumgebungen Object-Pascal / Delphi-Language Delphi MagSetWindowFilterList function not remove specified window of screenshot
Thema durchsuchen
Ansicht
Themen-Optionen

MagSetWindowFilterList function not remove specified window of screenshot

Ein Thema von flashcoder · begonnen am 27. Jan 2018 · letzter Beitrag vom 29. Jan 2018
 
Fukiszo
(Gast)

n/a Beiträge
 
#2

AW: MagSetWindowFilterList function not remove specified window of screenshot

  Alt 27. Jan 2018, 11:57
Delphi-Quellcode:
{ Here's how you can save the screen content into a bitmapfile.
  If you don't want to include the active (Delphi-)Application
  just put easily a 'Application.Minimize;' at the beginning
  of the procedure }


uses
  Windows, Graphics, Forms;

procedure TForm1.Button1Click(Sender: TObject);
var
  DC: HDC;
  Canvas: TCanvas;
  MyBitmap: TBitmap;
begin
  Canvas := TCanvas.Create;
  MyBitmap := TBitmap.Create;
  DC := GetDC(0);

  try
    Canvas.Handle := DC;
    with Screen do
    begin
      { detect the actual height and with of the screen }
      MyBitmap.Width := Width;
      MyBitmap.Height := Height;

      { copy the screen content to the bitmap }
      MyBitmap.Canvas.CopyRect(Rect(0, 0, Width, Height), Canvas,
                               Rect(0, 0, Width, Height));
      { stream the bitmap to disk }
      MyBitmap.SaveToFile('c:\windows\desktop\screen.bmp');
    end;

  finally
    { free memory }
    ReleaseDC(0, DC);
    MyBitmap.Free;
    Canvas.Free
  end;
end;
  Mit Zitat antworten Zitat
 


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 12:36 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