怎么样关闭所有打开的资源管理器的窗口
怎么样关闭所有打开的资源管理器的窗口
[解决办法]
试试这个:
http://bbs.csdn.net/topics/390488924
[解决办法]
Shell "taskkill /IM explorer.exe",vbHide
Dim w As New clsWindow
Dim sHwndAll$, v, i%
If w.GetWindowHwndByClassNameEx("CabinetWClass", , sHwndAll, True) > 0 Then 'xp下资源浏览器类名是CabinetWClass
v = Split(sHwndAll, " ") '所有符合条件的窗口句柄的集合
For i = 0 To UBound(v)
w.hWnd = v(i)
w.CloseWindow
Next
End If
Dim w As New clsWindow
Do While w.GetWindowHwndByClassName("CabinetWClass") > 0
w.CloseWindow
Loop
Dim w As New clsWindow
Dim sHwndAll$, v, i%
If w.GetWindowHwndByAppName("explorer.exe", , sHwndAll, True) > 0 Then 'xp下资源浏览器类名是CabinetWClass
v = Split(sHwndAll, " ") '所有符合条件的窗口句柄的集合
For i = 0 To UBound(v)
w.hWnd = v(i)
If w.Caption <> "" And w.Caption <> "Program Manager" And w.Visible Then '必须可见并且内容不为空不是系统特殊的窗口
w.CloseWindow
End If
Next
End If