def setWallpaper(self,fontsize=22,verticalspacing=26,leftmargin=800):
if self.__setimage(fontsize,verticalspacing,leftmargin)=="FilePathError":
return "FilePathError"
k = win32api.RegOpenKeyEx(win32con.HKEY_CURRENT_USER,"Control Panel\\Desktop",0,win32con.KEY_SET_VALUE)
win32api.RegSetValueEx(k, "WallpaperStyle", 0, win32con.REG_SZ, "2")
win32api.RegSetValueEx(k, "TileWallpaper", 0, win32con.REG_SZ, "0")
win32gui.SystemParametersInfo(win32con.SPI_SETDESKWALLPAPER, self.wallpaperpath, 1+2)
评论列表
文章目录