ImageEn for Delphi and C++ Builder ImageEn for Delphi and C++ Builder

 

ImageEn Forum
Profile    Join    Active Topics    Forum FAQ    Search this forumSearch
 All Forums
 ImageEn Library for Delphi, C++ and .Net
 ImageEn and IEvolution Support Forum
 Using CaptureFromScreen without object-instance?

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

View 
UserName:
Password:
Format  Bold Italicized Underline  Align Left Centered Align Right  Horizontal Rule  Insert Hyperlink   Browse for an image to attach to your post Browse for a zip to attach to your post Insert Code  Insert Quote Insert List
   
Message 

 

Emoji
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Black Eye [B)]
Frown [:(] Shocked [:0] Angry [:(!] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
PeterPanino Posted - Apr 15 2020 : 03:53:24
Is it possible to use TImageEnIO.CaptureFromScreen without using an existing instance of TImageEnView or without having to create a new instance of TImageEnView, by just using the referenced ImageEnView classes?
6   L A T E S T    R E P L I E S    (Newest First)
PeterPanino Posted - Apr 15 2020 : 18:11:53
Yes. Sorry for my stupidity. ;-)
xequte Posted - Apr 15 2020 : 17:24:43
Hi Peter

Sorry, were you able to resolve the issue?

Nigel
Xequte Software
www.imageen.com
PeterPanino Posted - Apr 15 2020 : 05:28:14
Sorry, I didn't read the DOCUMENTATION, where it says:

TImageEnIO.CreateFromBitmap: Creates a new instance of TImageEnIO, assigning the property AttachedIEBitmap or AttachedBitmap.
PeterPanino Posted - Apr 15 2020 : 05:21:22
I've tried this:

var
  bmp: TIEBitmap;
  IO: TImageEnIO;
begin
  bmp := TIEBitmap.Create;
  IO := TImageEnIO.CreateFromBitmap(bmp);
  try
    IO.CaptureFromScreen(iecsSpecifiedWindowClient, -1, FAppWindowHandle);
    IO.IEBitmap := bmp;
    bmp.CopyToClipboard(False);
  finally
    IO.Free;
    bmp.Free;
  end;


It works. But is it correct?
PeterPanino Posted - Apr 15 2020 : 05:11:50
Hi Nigel,

the bmp identifier in your source code example is not referenced in the capturing process. I need to copy the captured screenshot to the clipboard.
xequte Posted - Apr 15 2020 : 04:40:03
Hi Peter

No, but you can just create a TImageEnIO:

// Capture primary window to a bmp
var
  bmp: TIEBitmap;
  IO: TImageEnIO;
begin
    bmp := TIEBitmap.Create;
    IO := TImageEnIO.CreateFromBitmap( bmp );
    try
      IO.CaptureFromScreen( iecsPrimary );
      ... do something with bmp ...
    finally
      IO.Free;
      bmp.Free;
    end;
end;


Nigel
Xequte Software
www.imageen.com