Re: [MSEide-MSEgui-talk] Save form as bitmap?

2023-03-20 Thread Fred van Stappen
Re-hello Sieghard.

Ooops, once again I have to resent the mail with correction:

The only easy way I found was using BGRABitmap:

procedure TfrmMain.CopyScreenForm;
var
  FMyCapture: TBgraBitmap;
  Clip: TRect;
begin
  try
FMyCapture := TBgraBitmap.Create;
Clip := Bounds(Left, Top, Width, Height);
FMyCapture.TakeScreenShot(Clip); // here screenshot of the form 
only
Clipboard.Assign(FMyCapture.Bitmap);   // store to clipboard and do all 
you want after
FMyCapture.free;
  except
on E: exception do
  Clipboard.AsText := E.Message;
  end;
end;



De : Fred van Stappen 
Envoyé : mardi 21 mars 2023 01:53
À : General list for MSEide+MSEgui 
Objet : Re: [MSEide-MSEgui-talk] Save form as bitmap?

Hello Sieghard.

The only easy way I found was using BGRABitmap:


var
FMyCapture: TBgraBitmap;



procedure TfrmMain.CopyScreenForm;
var
  Clip: TRect;
begin
  try
Clip := Bounds(Left, Top, Width, Height);
Clipboard.Assign(FMyCapture.Bitmap);
  except
on E: exception do
  Clipboard.AsText := E.Message;
  end;
end;

Fre;D

___
mseide-msegui-talk mailing list
mseide-msegui-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk


Re: [MSEide-MSEgui-talk] Save form as bitmap?

2023-03-20 Thread Fred van Stappen
Hello Sieghard.

The only easy way I found was using BGRABitmap:


var
FMyCapture: TBgraBitmap;



procedure TfrmMain.CopyScreenForm;
var
  Clip: TRect;
begin
  try
Clip := Bounds(Left, Top, Width, Height);
Clipboard.Assign(FMyCapture.Bitmap);
  except
on E: exception do
  Clipboard.AsText := E.Message;
  end;
end;

Fre;D

___
mseide-msegui-talk mailing list
mseide-msegui-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk


Re: [MSEide-MSEgui-talk] Save form as bitmap?

2023-03-20 Thread Sieghard via mseide-msegui-talk
Hello Fred,

vous ecrit au Mon, 13 Mar 2023 17:18:53 +:

> LCL allows reading form's rendered bitmap by accessing
> TForm.GetFormImage. For example you can save the bitmap in a
...
> thing in msegui? Is it possible to somehow SaveToStream or SaveToFile the
> bitmap rendered by a msegui form?
> 
> How to do this with MSEgui or BGRABitmap ?

Question: did you get some response to your request already, or even a
solution to the task?
As this looked like an interesting challenge, and since I just can spend
some spare time to tackle it, I set out to try to implement such a function
for msegui. On the outset, it didn't seem to difficult, as there are many
functions concerning the manipulation of such data. But on closer
inspection, the chances dwindled away quite fast, as there seemed to be an
unbridgebale gap between the real image manipulation units, that also can
read and write image data and files, and the display bitmap functions
needed for drawing to windows on the screen. But it became even worse, when
I dug deeper, scrutinizing the function implementations. Well, trying to do
so, at least, as most of then - didn't even HAVE an implementation! They
are cleanly listed in the object interface definition (mostly deemed
"private", a few "even" protected), but in the implementation section, the
function header was - is - most everytime followed by an implementation
with only the line "  // dummy" in its body... Very disappointing,
So, for now, I practically gave up on a (hig level) implementation attempt,
as I'm afraid I'd not be able to do all the "grunt work" to fill up this
field of pitfalls, featuring a mass of gaping holes.
On the other hand, of course, all these function aren't really vital for
the function of a regular application built from msegui, as capturing of
graphical constructs doesn't seem to have been close to Martin's primary
target of application. Anyway, sometimes this could be used to advantage,
for documentation purposes e.g., even when it's not nomally needed. Even
for my "big project", I was asked to provide such a function to ease
documentation, although as a fast solution I just installed one of the
(many) available screen capturing programs, callable by a special funktion
key combination from within the application. That mostly did the job there,
but it did have it's problems, either...

So, for now at least, no solution from me, so I can just ask whether
someone else might have already succeeded?

-- 
(Weitergabe von Adressdaten, Telefonnummern u.ä. ohne Zustimmung
nicht gestattet, ebenso Zusendung von Werbung oder ähnlichem)
---
Mit freundlichen Grüßen, S. Schicktanz
---




___
mseide-msegui-talk mailing list
mseide-msegui-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk