First see this code by bushmobile.
This works perfectly. The form is always at bottom but on top of icons.
Now enable web view on your desktop. Show any html file as wallpaper. Then run the following code and hit command1.
See ? The form is now behind the icons.
Any idea how to do this when webview is not enabled ?
VB Code:
Option Explicit ' Add 2 command buttons in the form Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long Private Declare Function FindWindowEx Lib "user32" Alias "FindWindowExA" (ByVal hWnd1 As Long, ByVal hWnd2 As Long, ByVal lpsz1 As String, ByVal lpsz2 As String) As Long Private Declare Function SetParent Lib "user32" (ByVal hWndChild As Long, ByVal hWndNewParent As Long) As Long Dim Progman& Dim SHELLDLLDefView& Dim InternetExplorerServer& Private Sub Command1_Click() SetParent Me.hwnd, InternetExplorerServer End Sub Private Sub Command2_Click() SetParent Me.hwnd, Progman End Sub Private Sub Form_Load() Progman& = FindWindow("Progman", vbNullString) SHELLDLLDefView& = FindWindowEx(Progman&, 0&, "SHELLDLL_DefView", vbNullString) InternetExplorerServer& = FindWindowEx(SHELLDLLDefView&, 0&, "Internet Explorer_Server", vbNullString) Command1.Caption = "InternetExplorerServer" Command2.Caption = "Progman" End Sub





Reply With Quote