I cannot find any info in the
VB 2010 reference book regarding creating new Windows desktops.
Does anyone have any
VB.NET code they can share? I would like to be able to create a new desktop and run a kiosk type application on it.... just like this VB6 sample kiosk app I found at the link below.
http://www.vbaccelerator.com/home/VB...top_Sample.asp
So far I've only been able to create the new desktop and switch to it, then back to the original but cannot run an app on the new desktop. I'm using Imports System.Runtime.InteropServices and the CreateDesktop, OpenDesktop, and SwitchDesktop API's.
Thanks!
Code:
Private Declare Function OpenDesktop Lib "user32" Alias "OpenDesktopA" _
(ByVal lpszDesktop As String, _
ByVal dwFlags As IntPtr, _
ByVal fInherit As Boolean, _
ByVal dwDesiredAccess As IntPtr) As IntPtr
Private Declare Function CreateDesktop Lib "user32" Alias "CreateDesktopA" _
(ByVal lpszDesktop As String, _
ByVal lpszDevice As String, _
ByVal lpDevMode As IntPtr, _
ByVal dwFlags As IntPtr, _
ByVal dwDesiredAccess As IntPtr,
ByVal lpSecAttrib As IntPtr) As IntPtr
Private Declare Function SwitchDesktop Lib "user32" (ByVal hDesktop As IntPtr) As IntPtr