Solved

closing all applications on taskbar

Posted on 1998-07-16
3
123 Views
Last Modified: 2010-05-03
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
Comment
Question by:josmic
  • 2
3 Comments
 
LVL 8

Expert Comment

by:MikeP090797
ID: 1466021
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
 

Author Comment

by:josmic
ID: 1466022
Mikep
got what I needed with  IsIconic(H)
thanks, please answer for points

0
 
LVL 8

Accepted Solution

by:
MikeP090797 earned 100 total points
ID: 1466023
k
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Pull multiple cvs files into one access table 28 64
How to create a duplicate finder Application 9 115
MsgBox 2 47
VBA filters 2 50
Introduction I needed to skip over some file processing within a For...Next loop in some old production code and wished that VB (classic) had a statement that would drop down to the end of the current iteration, bypassing the statements that were c…
When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

911 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now