Has anybody got this to work?
I have:
Which I use thus:Code:Private Declare CreateDesktop Lib "user32" _ Alias "CreateDesktopA" ( ByVal lpszDesktop As String, _ ByVal lpszDevice As String, _ ByVal lpDevMode As Long, _ ByVal dwFlags As Long, _ ByVal dwDesiredAccess As Long, ByVal lpSecAttrib As Long ) As Long Public Const DESKTOP_FULLACCESS = &H1FF Public Const DF_ALLOWOTHERACCOUNTHOOK = &H1
Which seems to return a valid desktop handle...but then when I call SwitchDesktop :Code:hDesk = CreateDesktop("Merrion Computing", _ vbNullString, _ vbNull, _ DF_ALLOWOTHERACCOUNTHOOK , _ DESKTOP_FULLACCESS, _ vbNull)
used thusCode:Private Declare SwitchDesktop(ByVal hDesk As Long) As Long
Err.LastDllError is zero but nothing seems to happen.Code:lRet = SwitchDesktop(hDesk)
Any ideas?


Reply With Quote
