by Morpheous Dreams (3 Submissions)
Category: Miscellaneous
Compatability: Visual Basic 5.0
Difficulty: Beginner
Date Added: Wed 3rd February 2021
Rating: (4 Votes)
Put your desktop on a form and be able to click programs to open them right from it...
Side Effects
You have to restart / or \ log off computer afterwards to restore desktop
API DeclarationsPrivate 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 SysListView As Long
Dim SHELLDLLDefView As Long
Dim Progman As Long
Progman = FindWindow("Progman", vbNullString)
SHELLDLLDefView = FindWindowEx(Progman, 0, "SHELLDLL_DefView", vbNullString)
SysListView = FindWindowEx(SHELLDLLDefView, 0, "SysListView32", vbNullString)
Call SetParent(SysListView, Me.hWnd)