中文的资料好像很少有谈到的,这里有个英文资料:Desktop Switching.
例子里面主要是调用WinAPI的以下2个方法来创建和切换虚拟桌面:
[DllImport("user32.dll")]
private static extern IntPtr CreateDesktop(string lpszDesktop,
IntPtr lpszDevice,
IntPtr pDevmode,
int dwFlags,
long dwDesiredAccess,
IntPtr lpsa);
[DllImport("user32.dll")]
private static extern bool SwitchDesktop(IntPtr hDesktop);
你可以尝试自己测试下里面的代码,直接点击
Download source - 6 Kb就可以下载。
Caillen
MSDN Community Support | Feedback to us
Develop and promote your apps in Windows Store
Please remember to mark the replies as answers if they help and unmark them if they provide no help.