closing all applications on taskbar

How can I close all applications which are on the Start menu and minimized, (apps that show on taskbar)  with Vb5. (one command)
joe
 
 
 

josmicAsked:
Who is Participating?
 
MikeP090797Connect With a Mentor Commented:
k
0
 
MikeP090797Commented:
Try this:

Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long

Declare Function IsIconic Lib "user32" Alias "IsIconic" (ByVal hwnd As Long) As Long
Declare Function CloseWindow Lib "user32" Alias "CloseWindow" (ByVal hwnd As Long) As Long


H = FindWindow("", "")
Do While H<>0
if IsIconic(H) then CloseWindow(h)
loop
0
 
josmicAuthor Commented:
Mikep
got what I needed with  IsIconic(H)
thanks, please answer for points

0
All Courses

From novice to tech pro — start learning today.