예제 #1
0
        ///<summary>
        /// Creates a new desktop with the given name, and conditionally displays it.
        ///</summary>
        ///<param name="name">The name of the new desktop.</param>
        ///<param name="display">True if the new desktop should be displayed.</param>
        public Desktop(string name, bool display)
        {
            shouldDisplayDesktop = display;

            realDesktopHandle = CurrentHandle();
            testDesktopHandle = Win32.CreateDesktop(name, IntPtr.Zero, IntPtr.Zero, 0, Win32.GENERIC_ALL, IntPtr.Zero);

            Win32.SetThreadDesktop(testDesktopHandle);

            Switch(shouldDisplayDesktop);
        }
예제 #2
0
파일: Desktop.cs 프로젝트: sillsdev/wesay
        public Desktop(string name, bool display)
        {
            this.display = display;

            if (Environment.OSVersion.Platform != PlatformID.Unix)
            {
                realDesktop = CurrentHandle();

                handle = Win32.CreateDesktop(name, IntPtr.Zero, IntPtr.Zero, 0, Win32.GENERIC_ALL, IntPtr.Zero);

                Win32.SetThreadDesktop(handle);

                Switch(display);
            }
        }