新建From1(窗体),新建Command1(按钮CommandButton),代码:
Private Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As Long
Private Const WM_SYSCOMMAND = &H112
Private Const SC_TASKLIST = &HF130&
Private Sub Command1_Click()
SendMessage Me.hwnd, WM_SYSCOMMAND, SC_TASKLIST, &O0
End Sub