VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



Desktop on form

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 Declarations
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

Rate Desktop on form

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)

Download this snippet    Add to My Saved Code

Desktop on form Comments

No comments have been posted about Desktop on form. Why not be the first to post a comment about Desktop on form.

Post your comment

Subject:
Message:
0/1000 characters