Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I exclude my own window without flicker when I take a screenshot?

We have a Delphi-based application that captures the desktop via the GDI. The only problem is that the application window is being captured during the process as well, which we want to avoid.

We tried to resolve it by hiding and showing the application window before and after the capture operation, however this results in a heavy flickering.

Will appreciate any other methods suggestions to resolve this.

like image 531
SyBer Avatar asked Dec 17 '25 18:12

SyBer


2 Answers

You may resolve this using windows magnifier functionality. You can exclude or include any windows (http://msdn.microsoft.com/en-us/library/windows/desktop/ms692402%28v=vs.85%29.aspx). So you can get a screen shot of the screen excluding the windows you do not need. This approach will work on Windows upper then XP (7, vista, 8);

like image 135
Anton Avatar answered Dec 19 '25 15:12

Anton


If you wanna take a screenshot of the entire desktop and without your application window I belive there are two options.

  1. As you already figured out you should hide the your applications window before taking a screenshot. Now minimizing and maximizing your application is not good due to minimization/maximization effects. So you can either try to move it out of visible area or maybe enable alpha transparency and temporary set it to 0 (fully transparent).

  2. Another approach is to enumerate all visible windows, take screenshot of every specific window and then compose the final screenshot by placing combining screenshots of seperate windows by placing them in correct position. Now main advantage of such approach is that you can exclude whichever window you want, can even be a window of some other application which you don't have controll of. But the main disadvantage of such approach is that it is much slower and much more memory demanding.

like image 21
SilverWarior Avatar answered Dec 19 '25 14:12

SilverWarior



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!