Delphi-PRAXiS
Seite 2 von 2     12   

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Lazarus (IDE) (https://www.delphipraxis.net/81-lazarus-ide/)
-   -   Screenshot aber wie?! (https://www.delphipraxis.net/178441-screenshot-aber-wie.html)

Skrenkovic 8. Jan 2014 20:09

AW: Screenshot aber wie?!
 
So.... ich habs ma gekürzt...
Code:
R.TopLeft := Form1.BoundsRect.TopLeft;
  R.BottomRight := Form1.BoundsRect.BottomRight;
  MyDC := GetDC(Self.Handle);
  MyBitmap := TBitmap.Create;
  MyBitmap.Width := R.Right - R.Left;
  MyBitmap.Height := R.Bottom - R.Top;

  try
    MyBitmap.LoadFromDevice(MyDC);
    MyBitmap.SaveToFile('FormsAppearance.bmp');
  finally
    ReleaseDC(Self.Handle, MyDC);
    FreeAndNil(MyBitmap);
  end;
funktioniert ... is zwar kein png aber ... okay

wenn ihr mir jetzt verraten würdet wie ich ca 2 fingerbreit unten das bild kürzen könnte (weil ich nicht das ganze fester bracuhe sondern von der höhe nur ca 2/3
währe echt super von euch .... sry meine unwissenheit

Popov 8. Jan 2014 20:28

AW: Screenshot aber wie?!
 
Wie schon erwähnt
Delphi-Quellcode:
R := Form1.BoundsRect;
macht in einer Zeile was du in zwei machst.


Alle Zeitangaben in WEZ +1. Es ist jetzt 01:46 Uhr.
Seite 2 von 2     12   

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 by Thomas Breitkreuz