I am trying to make window screenshot tool that can grab windows hidden in background. I know only one way to do this - through PrintWindow function, which fails for DirectX windows. So is it possible to detect that the window is rendered by DirectX and fail early?
Related
I'm trying to programmatically open an image from a folder and have it completely fill the screen, and it seems the only way to have an image completely fill the screen is to click the Slideshow button in Windows Photo Viewer and pause the slideshow. However, in Windows 10 it isn't even possible to programmatically open an image (at least, not via the command line, using either Windows Photo Viewer or Photos), let alone paused in slideshow mode.
If not the command-line, are there any other good programmatic solutions for what I want to do?
Hashim - You could quite easily write an app for this using open Lazarus.
How to grab a screenshot of a DirectX window that is not in foreground and doesn't have focus. I want to monitor what happens with application in the background, but without switching to it.
The standard way with PrintWindow doesn't work. You can test that on Unity apps, for example.
We are building a Desktop app which has to activate keynote application on desktop automatically in slideshow mode.
The problem is that the slideshow is taking over the whole screen.
Is there a way to control the size of the keynote window in slideshow mode?
You can try SIMBL package and hook the functions of the window related to the full screen. You may use class dump to figure out what is going on in the Keynote app. However, you will meet another problems - your window is still without menu, you will be forced to handle resize events, etc.
There is an application written in Java using AWT. And I want to resize its windows by an external program. My OS is Windows XP. Actually this application is an online poker client.
The windows are of "SunAwtFrame" class, so I look for those windows and call MoveWindow/SetWindowPos on them. The result is not the one I expect:
a problem http://savepic.net/1331700.png
As you see, the window did resize, but the content did not. While resizing manually it scales, and I want the same behavior here.
Probably, some additional action are needed to make AWT windows understand it was resized.
How can I fix the problem?
I recommend doing this:
Use Spy++ (available as a tool in Microsoft
Visual Studio) to filter messages sent to the SunAwtFrame window.
Resize window manually.
Figure out which messages are sent to the window during resizing. Use
MoveWindow/SetWindowPos and/or send those messages after you resize.
Take a look at functions InvalidateRect and UpdateWindow.
I am trying to write a program that gets the windows that are displayed on the screen. Something like screen.getActiveWindow().size would be cool, but it only addresses the active window.
I am looking for the sizes of all windows on the screen, as well as event information when they are resized, cover each other up.
Am I just daydreaming or is there a way to get this information on windows?
You need to use EnumWindow Function go get the hwnd of each window then user EnumChildWindow to get the child windows and finally get windowinfo the clr doesn't have all of the necessary function to do low level window manipulation unless its been added in 4.0 and I haven't noticed.