Windows Wallpapers: Not Just BMP?

I read in several places that desktop wallpapers can be installed in an HTML document. Has anyone had any success modifying it programmatically?

The following VB6 snippet helps me set things up for BMP, but when I try to use it for HTML, I get a nice blue background and nothing more.

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

Perhaps there are other settings. Any ideas?

+3
source share
5 answers

, API, , Sysinternal Process Monitor , , HTML . . , API / .

+1

, , "Active Desktop".

HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\ForceActiveDesktopOn 1 ( ).

, .

+2

, , egl1044 . , IActiveDesktop. VB6 VB6 - JPEG ( ).

+2

: http://www.microsoft.com/technet/prodtechnol/windows2000serv/reskit/w2rkbook/gp.mspx?mfr=true


, . . : http://blogs.msdn.com/coding4fun/archive/2006/10/31/912569.aspx.

. HTML .


, HTML HKCU\Software\Microsoft\Internet Explorer\Desktop\General. , , . , Windows , .
0

I recommend only BMP format. Do not use ActiveDesctop, because after that your computer will run slowly.

0
source

Source: https://habr.com/ru/post/1697027/


All Articles