Sign in to follow this  
Followers 0
scila1996

How to refresh Windows Explorer Shell ?

2 posts in this topic

I've written a program and some edit registry keys , I don't know which method or fuction to refresh windows explorer (do not refresh desktop). example change font size or desktop wallpaper v.v...

Thank you for reading and reply !

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

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
1 person likes this

Share this post


Link to post
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
Sign in to follow this  
Followers 0