fb:porticula NoPaste
LockDemo, erstellen von Desktops und auswechseln eben jener (Ab Win2000)
Uploader: | csde_rats |
Datum/Zeit: | 28.12.2010 13:27:07 |
' lockdemo, demonstrates how desktops are created and switched
' Copyright (c) 2010 Marian Beermann, marianbeermann.de
#Include "windows.bi"
'DESKTOP_CREATEWINDOW Or _
'DESKTOP_ENUMERATE Or _
'DESKTOP_HOOKCONTROL Or _
'DESKTOP_SWITCHDESKTOP Or _
'DESKTOP_WRITEOBJECTS Or _
'DESKTOP_READOBJECTS
Dim As HDESK hCDesktop
hCDesktop = OpenInputDesktop(NULL, NULL, DESKTOP_SWITCHDESKTOP)
If(hCDesktop <> 0) Then
Print "caught current desktop, h=" & hCDesktop
Else
Print "can't read current desktop!"
Sleep
End
EndIf
Dim As HDESK hLDesktop
hLDesktop = CreateDesktop("lockdemo_desktop", _
NULL, _
NULL, _
NULL, _
GENERIC_ALL, _
NULL)
If(hLDesktop <> 0) Then
Print "desktop created, h=" & hLDesktop
Else
Print "error creating desktop"
Sleep
End
EndIf
Print "switching desktops right now!"
SwitchDesktop(hLDesktop)
Sleep 2500
Print "switching back now"
SwitchDesktop(hCDesktop)
Print "if it worked you should now see this windows again"
Sleep
End