Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 132
  • Last Modified:

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
 
 
 

0
josmic
Asked:
josmic
  • 2
1 Solution
 
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
 
MikeP090797Commented:
k
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

The 14th Annual Expert Award Winners

The results are in! Meet the top members of our 2017 Expert Awards. Congratulations to all who qualified!

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now