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

 

ImageEn Forum
Profile    Join    Active Topics    Forum FAQ    Search this forumSearch
Forum membership is Free!  Click Join to sign-up
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 ImageEn Library for Delphi, C++ and .Net
 ImageEn and IEvolution Support Forum
 IO.CaptureFromScreen problem
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

PeterPanino

860 Posts

Posted - Jun 18 2019 :  10:36:27  Show Profile  Reply
ImageEnView1.IO.CaptureFromScreen(iecsSpecifiedWindow, -1, NotepadWindowHandle);


This gives this correct screenshot from Notepad:



HOWEVER, if Notepad is MINIMIZED, then I get this undesired screenshot from Notepad:



Question: is there a way to get the correct screenshot from Notepad EVEN when Notepad is minimized?

Attached the source of the test project:

attach/PeterPanino/2019618103542_TImageEnIOCaptureFromScreen_Test.zip
49.58 KB

xequte

38182 Posts

Posted - Jun 18 2019 :  16:29:48  Show Profile  Reply
Hi

ImageEn cannot capture a minimized window. You might try:

https://stackoverflow.com/questions/27024554/capture-screenshot-from-selected-minimized-window

Or force display using ShowWindow and minimize it again afterward:

https://docs.microsoft.com/en-us/windows/desktop/api/winuser/nf-winuser-showwindow




Nigel
Xequte Software
www.imageen.com
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
Jump To: