Le prog suivant va donc rechercher le bureau et s'il le trouve, le cacher pendant 3 secondes et le ré afficher pour que vous puissiez vérifier que cela fonctionne bien.
Donc fonctionne pour moi, Window 8.1 x64.
J'attends vos retours!
Code : Tout sélectionner
ExamineDesktops()
Procedure.l EnumProc(hWnd.i, *lParam.integer)
Protected ParentRootClass.s, ClassName.s
Protected Title.s, Rect.RECT, hancestror.i
ClassName = Space(1024)
GetClassName_(hWnd, @ClassName, 1024)
If LCase(ClassName) = LCase("SysListView32")
hancestror.i = GetAncestor_(hWnd, #GA_ROOTOWNER)
If hancestror <> hwnd
ParentRootClass = Space(1024)
GetClassName_(hancestror, @ParentRootClass, 1024)
If LCase(ParentRootClass) = LCase("Progman") Or LCase(ParentRootClass) = LCase("WorkerW")
GetWindowRect_(hancestror, @Rect.RECT)
If DesktopWidth(0) = Rect\right
If DesktopHeight(0) = Rect\bottom
*lParam\i = hwnd
ProcedureReturn #False
EndIf
EndIf
EndIf
EndIf
EndIf
ProcedureReturn #True
EndProcedure
hWnd = GetDesktopWindow_()
If hWnd <> 0
EnumChildWindows_(hWnd, @EnumProc(), @HandleShell)
EndIf
If HandleShell <> 0
ShowWindow_(HandleShell, #SW_HIDE)
Delay(3000)
ShowWindow_(HandleShell, #SW_SHOW)
EndIf