Link to home
Start Free TrialLog in
Avatar of josmic
josmic

asked on

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
 
 
 

Avatar of MikeP090797
MikeP090797

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
Avatar of josmic

ASKER

Mikep
got what I needed with  IsIconic(H)
thanks, please answer for points

ASKER CERTIFIED SOLUTION
Avatar of MikeP090797
MikeP090797

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial