Avant de tester je voulais savoir ce que vous en pensiez.
Peux t'on empêcher l'interface avec les icons de windows de demarrer et le remplacer part sa propre interface développer en Purebasic ?
j'ai trouver cette clef dans la base des registres :
HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\WinLogon\Shell
qui apparemment lance le fameux explorer.exe
a votre avis c'est possible? est ce qu'il y a un risque critique si je modifie cette clef pour demarrer ma propre application ?
Merci d'avance
Remplacement de Explorer.exe
Tu peux créer un bureau virtuel
Voici le code de uweb:
Voici le code de uweb:
Code : Tout sélectionner
;
#WINSTA_ALL = #WINSTA_ACCESSCLIPBOARD | #WINSTA_ACCESSGLOBALATOMS | #WINSTA_CREATEDESKTOP | #WINSTA_ENUMDESKTOPS | #WINSTA_ENUMERATE | #WINSTA_EXITWINDOWS | #WINSTA_READATTRIBUTES | #WINSTA_READSCREEN | #WINSTA_WRITEATTRIBUTES | #DELETE | #READ_CONTROL | #WRITE_DAC | #WRITE_OWNER
#DESKTOP_ALL = #DESKTOP_READOBJECTS | #DESKTOP_CREATEWINDOW | #DESKTOP_CREATEMENU | #DESKTOP_HOOKCONTROL | #DESKTOP_JOURNALRECORD | #DESKTOP_JOURNALPLAYBACK | #DESKTOP_ENUMERATE | #DESKTOP_WRITEOBJECTS | #DESKTOP_SWITCHDESKTOP | #STANDARD_RIGHTS_REQUIRED
Global FontID1
FontID1 = LoadFont(1, "Arial", 22, #PB_Font_Bold)
;Show an error
Procedure Abort(s.s)
MessageRequester("", "Error: "+s.s)
Debug "Error: "+s.s
End
EndProcedure
;Check a result and ev. abort
Procedure Chk(a.l, s.s)
;If a is false, abort.
;If a is false and s contains an error message, show it before abort.
If Not(a)
If s.s
Abort(s.s)
Else
End
EndIf
EndIf
EndProcedure
hWinSta = OpenWindowStation_("WinSta0", 0, #WINSTA_ALL)
Chk( SetProcessWindowStation_(hWinSta) , "Failed to set window station")
hDefaultDesk = OpenDesktop_("Default", #DF_ALLOWOTHERACCOUNTHOOK, 0, #DESKTOP_SWITCHDESKTOP)
Chk(hDefaultDesk, "Failed to open default desktop")
hDesk = CreateDesktop_("My Desktop 2", 0, 0, #DF_ALLOWOTHERACCOUNTHOOK, #DESKTOP_ALL, 0)
Chk( hDesk, "Failed to create desktop")
SetThreadDesktop_(hDesk) ;<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
Chk( SwitchDesktop_(hDesk), "Failed to switch desktop")
If OpenWindow(1, 216, 0, 255, 165, "Test", #PB_Window_SystemMenu | #PB_Window_SizeGadget | #PB_Window_TitleBar )
If CreateGadgetList(WindowID(1))
TextGadget(1, 20, 70, 210, 30, "Test", #PB_Text_Center)
SetGadgetFont(1, FontID1)
EndIf
EndIf
Repeat
Event = WaitWindowEvent()
WindowID = EventWindow()
GadgetID = EventGadget()
EventType = EventType()
If Event = #PB_Event_Gadget
EndIf
Until Event = #PB_Event_CloseWindow
;Delay(2000)
Chk( SwitchDesktop_(hDefaultDesk), "Failed to switch desktop")
SetThreadDesktop_(hDefaultDesk) ;<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
CloseDesktop_(hDesk)
CloseDesktop_(hDefaultDesk)
CloseWindowStation_(hWinSta)