[此贴子已经被作者于2005-4-10 18:12:48编辑过]
我写的两个函数 Private Const SPI_SETDESKWALLPAPER = 20 Private Const SPIF_UPDATEINIFILE = &H1 Private Declare Function SystemParametersInfo Lib "user32" Alias "SystemParametersInfoA" (ByVal uAction As Long, ByVal uParam As Long, ByVal lpvParam As Any, ByVal fuWinIni As Long) As Long Private Sub SetWallPaper() Dim WinDir As String Dim FilePath As String WinDir = Environ("windir") FilePath = IIf(Right(WinDir, 1) = "\", WinDir, WinDir & "\") & "MyProc.bmp" SavePicture Picture1.Image, FilePath Call SystemParametersInfo(SPI_SETDESKWALLPAPER, 0, FilePath, SPIF_UPDATEINIFILE) End Sub
Private Sub ClearWallPaper() Call SystemParametersInfo(SPI_SETDESKWALLPAPER, 0, "", SPIF_UPDATEINIFILE) End Sub
[此贴子已经被作者于2005-4-10 21:38:17编辑过]