Recent

Author Topic: screen capture of forms  (Read 21385 times)

Thaddy

  • Hero Member
  • *****
  • Posts: 18729
  • To Europe: simply sell USA bonds: dollar collapses
Re: screen capture of forms
« Reply #15 on: August 06, 2018, 07:28:37 am »
Hi, excuse me, why when people post code don't include the uses clause !
Because most people still use Windows and on Windows it isn't necessary to use lclintf.
For other widgets sets, Lazarus actually mimics (some) Windows behavior through lclintf.
That makes porting your code to other platforms easier. In most cases it is transparent.
For Windows that would mean lclintf is an empty unit. (Which it probably is...)
« Last Edit: August 06, 2018, 09:08:40 am by Thaddy »
If Europe sells their USA bonds the USD will collapse. Europe can affort that given average state debts. The USA can't affort that. Just an advice...

BeanzMaster

  • Sr. Member
  • ****
  • Posts: 268
Re: screen capture of forms
« Reply #16 on: August 06, 2018, 09:55:22 am »
Hi
for taking a screenshot of a form you can simply use the
Code: Pascal  [Select][+][-]
  1. function TForm.GetFormImage

Code: Pascal  [Select][+][-]
  1. Var
  2.  bmp : TBitmap;
  3.  
  4.  bmp := Form1.GetFormImage

Weiss

  • Full Member
  • ***
  • Posts: 231
Re: screen capture of forms
« Reply #17 on: August 28, 2023, 07:57:10 am »
To save the image using SaveDialog, which extension should I use?

you can use any extension. I just tried, created image as .png and saved it as bitmap.

 

TinyPortal © 2005-2018