我已经阅读了几个地方的桌面墙纸可以设置为HTML文档。有没有人有任何成功改变它编程?Windows壁纸:不只是BMP?
下面的VB6代码片段可以帮助我设置BMP,但是当我尝试将它用于HTML时,我得到了一个很好的蓝色背景,没有其他的东西。
Dim reg As New StdRegistry
Public Function CurrentWallpaper() As String
CurrentWallpaper = reg.ValueEx(HKEY_CURRENT_USER, "Control Panel\Desktop", "Wallpaper", REG_SZ, "")
End Function
Public Sub SetWallpaper(cFilename As Variant)
reg.ClassKey = HKEY_CURRENT_USER
reg.SectionKey = "Control Panel\Desktop"
reg.ValueKey = "Wallpaper"
reg.ValueType = REG_SZ
reg.Default = ""
reg.Value = cFilename
End Sub
Public Sub RefreshDesktop()
Dim oShell As Object
Set oShell = CreateObject("WScript.Shell")
oShell.Run "%windir%\System32\RUNDLL32.EXE user32.dll,UpdatePerUserSystemParameters", 1, True
End Sub
也许还有的需要的其他一些设置。有任何想法吗?
是的,我试过了。我仍然经历了大量的数据试图找出什么是什么。 – bugmagnet 2008-09-17 16:52:42