本帖最后由 lixiaolong 于 2012-3-22 18:25 编辑
回复 5# wl00560
看看这个可以不?桌面图标还是消失一下.
#include <WinAPI.au3>
#include <Constants.au3>
$s_BitmapImage = "Desert.jpg"
_SetWallpaper($s_BitmapImage, 0, 1)
Func _SetWallpaper($s_BitmapImage, $l_params = 0, $s_Sleep = 10)
Local $trans, $ai_Ret
SplashImageOn("Splash", $s_BitmapImage, @DesktopWidth + 2, @DesktopHeight - 28, -2, -2, 1)
_WinAPI_SetWindowPos(WinGetHandle("Splash"), $HWND_BOTTOM, -2, -2, @DesktopWidth + 2, @DesktopHeight - 28, $SWP_NOACTIVATE)
WinSetTrans('Splash', "", 0)
For $trans = 0 To 255
If $trans = 255 Then _
$ai_Ret = DllCall('user32.dll', 'long', 'SystemParametersInfoA', 'long', 0x14, 'long', 0, 'str', $s_BitmapImage, 'long', $l_params)
WinSetTrans("Splash", "", $trans)
Sleep($s_Sleep)
Next
SplashOff()
Return $ai_Ret[0]
EndFunc ;==>_SetWallpaper
|