VD Technologies

Nov 4, 2007 at 4:54 AM
Hi...

Is the method to create the virtual desktops just an offset?
Coordinator
Nov 14, 2007 at 1:30 AM
Edited Nov 14, 2007 at 1:38 AM
No, but close. I simply call the ShowWindow function passing in SW_HIDE to hide them in place. As long as you keep track of what windows you hid, showing them again isn't an issue. Funny enough, minimized windows are simply offset rather than actually hidden. If you try to get the position of a minimized window, it will give you something around (-3000,-3000). They are still rolled up into their titlebars as well, the same as they were in Windows 3.1, but since they are offset, most people never get to see them.

There are other ways to create virtual desktops as well. Every version of Windows that is NT based (NT, 2000, XP, 2003, and Vista) actually has a much-superior virtual desktop ability built into it. Each user logged on is actually on a separate desktop, as is the login screen, the screensaver, and the Ctrl-Alt-Del screen. These desktops use NT's security, so they aren't very useful for most users (you can't switch programs between them and you definitely can't share thumbnails between them).
Nov 14, 2007 at 6:57 AM
That's what I figured. I was looking in the possibility of using the separate desktop SDK, but having such an environment where you can't move applications between them is useless for a lot of people. It would be nice if there was a way to start a new desktop with the same security rights where you could share the process' between them, but I suppose the security risks are too great.

Thanks for the reply & happy coding!


zhuman wrote:

There are other ways to create virtual desktops as well. Every version of Windows that is NT based (NT, 2000, XP, 2003, and Vista) actually has a much-superior virtual desktop ability built into it. Each user logged on is actually on a separate desktop, as is the login screen, the screensaver, and the Ctrl-Alt-Del screen. These desktops use NT's security, so they aren't very useful for most users (you can't switch programs between them and you definitely can't share thumbnails between them).

Coordinator
Nov 14, 2007 at 7:31 PM
There are certainly some uses for a virtual desktop program that uses secure desktops though. Basically, if you were to create a virtual desktop program using secure desktops, you would have to use native code. Then, you would create one thread for each desktop and, on each thread, call userinit.exe and then register system tray icons, open your windows, etc. Therefore, it might be useful for an environment where you have two or three desktops (maybe for a kiosk or something similar), but since you have to do everything multiple times, it could become a memory hog with more than a few desktops (there would be one instance of explorer per desktop, more than one instance of many of the autostart programs, copies of your windows for each desktop, and more). Plus, the limitation of not being able to switch programs between desktops is pretty daunting. It's not really that there are security risks, but more that the user experience could be hampered. If your program crashes, the user is left on their current desktop without any means to switch back. Another problem is that when the user presses Ctrl-Alt-Del and select Task Manager, I've heard that it only opens on the first desktop, plus it only lists "tasks" for the current desktop (it would still list all processes, but many users don't use that tab).