programmatically close WTSSendMessage dialog box

Hi,
I am launching one UI dialog box using WTSSendMessage in a windows service. I want to close this dialog box programmatically.
Can we programmatically close the dialog box that is created by the WTSSendMessage api function from a windows service on windows 7?

if your service runs at the same machine you could close any dialogbox where you have a handle from by a PostMessage call, posting a WM_CLOSE message. you could retrieve the windows handle of the dialog

if your service runs at the same machine you could close any dialogbox where you have a handle from by a PostMessage call, posting a WM_CLOSE message. you could retrieve the windows handle of the dialog box either by FindWindow or EnumWindows api.

if you sent the message from a remote service you could use the timeout argument of WTSSendMessage to close the window after a timeout.

Windows 7 Ultimate and Enterprise (and 2008 R2) introduced a new feature you may not be aware of - Boot from VHD.
Boot from VHD (or what Microsoft refers to asNative Boot allows you to install Windows to a VHD (Virtual Hard Disk) file that is t…

When you start your Windows 10 PC and got an "Operating system not found" error or just saw "Auto repair for startup". After a while, you have entered a loop for Auto repair which does not fix anything and you will be in a panic as all your work w…

In this video, we discuss why the need for additional vertical screen space has become more important in recent years, namely, due to the transition in the marketplace of 4x3 computer screens to 16x9 and 16x10 screens (so-called widescreen format). …

This Micro Tutorial will teach you the basics of configuring your computer to improve its speed. It will also teach you how to disable programs that are running in the background simultaneously.
This will be demonstrated using Windows 7 operating…