Jump to content

How to refresh Windows Explorer Shell ?


Recommended Posts

This can help :

when you want change Wallpaper Desktop you need refresh :

_ChangeWallpaper(@DesktopDir&"/image.jpg",1)

Func _ChangeWallpaper($sFile,$iType)

  If Not FileExists($sFile) Then
     SetError(1)
     Return -1
  EndIf
  If StringTrimLeft($sFile,StringInStr($sFile,'.',0,-1)) <> 'jpg' Then
     SetError(2)
     Return -2
  EndIf

  Select
  Case $iType = 1
     RegWrite('HKCU\Control Panel\Desktop','TileWallpaper','reg_sz','0')

  Case Else

  EndSelect

  RegWrite('HKCU\Control Panel\Desktop','Wallpaper','reg_sz',$sFile)
  DllCall("User32.dll","int","SystemParametersInfo","int",20,"int",0,"str",$sFile,"int",0)
  Return 0

EndFunc
Edited by ahmeddzcom
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...