Hi,@Md. Niaz Mahmud. Welcome to Microsoft Q&A Forum.
You could try to interact with the Windows Desktop Window Manager (DWM) API to capture and manipulate thumbnail previews of specific applications. For specific code, you can refer to the solution https://stackoverflow.com/a/17486560 and the links therein.
This code registers a thumbnail for a specified window and updates the thumbnail properties. You also seem to be trying to capture the content of a specified window.
Registering Thumbnail: The code registers a thumbnail of a specified window successfully using the DwmRegisterThumbnail method. This is the first step in creating a live thumbnail of the window.
Updating Thumbnail: The UpdateThumb method updates the properties of the thumbnail, making it visible and specifying its destination. It also specifies the opacity of the thumbnail. These are crucial steps for controlling how the thumbnail appears.
Please note that working with the DWM API is complex, and the code represents only a part of what would be needed to create a full-featured application with live previews. Additionally, this kind of low-level interaction with the system can have unexpected behavior and might not be appropriate for all use cases. Always consider the user experience and the impact on system stability when implementing such functionality.
If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.