ctrl+alt+del 选explorer结束任务就行了!!

解决方案 »

  1.   

    forprograme可能误解我的意思了,我把问题再说一下,在桌面上双击我的电脑,然后怎样把出现的这个窗体关闭(当然要用代码来实现)
      

  2.   

    模拟键盘先
    然后用api函数得到它的句柄,然后模拟alt+F4
      

  3.   

    用alt+f4就不用句柄了吧,但该方法有一个不好的地方,它一定要把想关闭的窗体放在最前,而且关闭后可能会把其他窗体带到最前,不是很好,有没有像sendmessage那样的纯粹api方法,先谢了
      

  4.   

    Windows Explorer和Internet Explorer 都可以用一个ShellWindows对象给列举出来。下面的例子就是用来把标题为My Computer的Windows Explorer 窗口关闭掉(您需要引用Microsoft Internet Controls类型库)。   Dim SWs As New SHDocVw.ShellWindows
       Dim IE As SHDocVw.InternetExplorer   Private Sub Form_Load()
            For Each IE In SWs
             If IE.LocationName = "My Computer" Then
                IE.Quit '把标题为My Computer的explorer关掉
             End If
          Next
       End Sub