How to make my form a desktop window

Hi, I want to ask how can I make my form in visual basic become a desktop windows. Cause I want to make a shell replacement for windows. Does any body know how to make it? Thank you.
Who is Participating?
JackOfPHConnect With a Mentor Commented:
here you go...

Option Explicit

Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
Private Declare Function GetWindow Lib "user32" (ByVal hwnd As Long, ByVal wCmd As Long) As Long
Private Declare Function SetParent Lib "user32" (ByVal hWndChild As Long, ByVal hWndNewParent As Long) As Long

Private Const GW_CHILD = 5
Private Sub Form_Load()
    Dim lngHandle As Long
    lngHandle = FindWindow("ProgMan", vbNullString)
    lngHandle = GetWindow(lngHandle, GW_CHILD)
    lngHandle = GetWindow(lngHandle, GW_CHILD)
    Call SetParent(Me.hwnd, lngHandle)
End Sub
The form is a desktop windows without the need of doing nothing special.
What kind of Form do you want? a MDI form for multiple documents?
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.