Kobayashi VB6 live wallpaper simulation program

The project reference the following information [This may help you understand the program run]:

https://github.com/Yinmany/WinWallpaper

https://blog.csdn.net/breaksoftware/article/details/4332371

https://tieba.baidu.com/p/5015219921?red_tag=0411291965

Cited Thunder Aplayer engine:

http://aplayer.open.xunlei.com/index.html

The project Address: https://github.com/Tyningling/Dynamicwallpaper

——————————————————————————————

1. Create wallpaper form:

Use win32api.SendMessageTimeOut transmission 0x52C [SysListView32 This step will separate to the Program Manager Program Manager. ]

After our form Form2, set the subform Program Manager of [hell 7 March 21]

So that our form has become a form before the wallpaper.

2. TXMiniSkin__ on this form is Tencent Desktop finishing assembly

In a test environment, the desktop assistant 360 can coexist with wallpaper form, because it is an independent form, the form is created using a method similar to wallpaper, set up a transparent income Nag, to achieve this program is also very simple.

However, Tencent desktop finishing, it is not so kind, and see the big screen:

(The picture shows the SetParent to its parent form Form1)

Yes, it had a TxMiniSkin establish a form, and then draw the icon, and constantly refresh themselves as wallpaper form, finally my solution is:

In EnumWindowsProcA () callback function, find it, and set it as a hidden form.

Public Workerw As Long, Tx As Long, Tx_B As Boolean
Public Function EnumWindowsProcA(ByVal hWnd As Long, ByVal lParam As Long) As Boolean
If win32api.FindWindowExA(hWnd, 0&, "SHELLDLL_DefView", "") <> 0& Then
Workerw = win32api.FindWindowExA(&O0, hWnd, "WorkerW", "")
'Call win32api.ShowWindow(Workerw, SW_SHOW)
Call win32api.ShowWindow(Workerw, SW_HIDE)
End If
'特殊处理:
'__________关于腾讯桌面整理导致的问题
If Not Tx_B Then
Tx = win32api.FindWindowExA(hWnd, 0&, "TXMiniSkin", "桌面整理")
If Tx <> 0 Then Call win32api.ShowWindow(Tx, SW_HIDE): Tx_B = True
End If
EnumWindowsProcA = True
End Function

3.動態壁紙組件

我所使用的是迅雷的Aplayer,由于解碼庫比較大,所以請自行從官網下載并放置到 【Bin\Codecs】 中。

爲什麽使用Aplayer?  大概是因爲比較方便,VB6可以直接調用ActiveX控件,但是你必須先使用install.bat對它進行安裝。

另外,其實你也可以使用別的播放組件來實現播放。

Guess you like

Origin www.cnblogs.com/lingqingxue/p/11275587.html