Search code examples
c#virtualdesktop

Creating an extra desktop in C#


I've seen some applications that create virtual desktops. I want to create one.

However, I do not know how you would do this, or even it it is possible.

How do I create a virtual desktop/monitor in C#?


Solution

  • You need to use CreateDesktop function in order to create full functional dekstop on windows os:

    Creates a new desktop, associates it with the current window station of the calling process, and assigns it to the calling thread. The calling process must have an associated window station, either assigned by the system at process creation time or set by the SetProcessWindowStation function.

    Would invite your attention also on interesting article from CodeProject:

    Desktop Switching

    In general multidektop environment already exists in Windows Os for many years, but never has been "visible" via any multi-dektop application implemented by MS itself. For some reason MS never, as much as I'm aware of, implemented multidesktop app.

    If I'm not mistaken, beginning even from WindowsNT familly OSes, you already have a second desktop. When you press Ctrl+Alt+Del the screen that appears, in reality, is on another, fully functional, windows desktop.