.net – How to use the secure desktop in Windows Vista and W7

netwinapi

Windows Vista added a new feature called the "Secure Desktop". It looks great and really draws the user's attention. But now, I want to use this desktop in my .NET/C# or Delphi/WIN32 application. And use it for my own dialog, which will ask the user for about 5 different but sensitive pieces of information.

Is there a way to use it in .NET?
Is there a way to use it in WIN32?

Best Answer

If you think about it, you'll discover that there's no way to change that secure desktop.

The secure desktop is above the normal desktop, with everything else disabled. And it doesn't allow normal programs to interfere with it (otherwise it would be useless).

And AFAIK it also runs with elevated privileges so it can elevate whatever it was called for if you click on "yes".

All you can do is try to emulate the secure desktop by taking a screenshot of the current desktop, darken that image, then create a top-level window, draw that image in it, then show a dialog with buttons on it (also as a top-level window). But of course, a simple alt-tab will allow users to switch back.