472,958 Members | 2,533 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,958 software developers and data experts.

Detect and close all running applications

Hi. I tried to detect all running user applications (no all processes) and
close them all. Obviously this is a usual function that has been existing in
many programs.

I used the ::EnumWindows API to enumerate all the windows. There are a lot
of irrelevant result so I have to use some filters. One of them is to filter
out the invisible windows.

But unfortunately this filter also filters out the applications that was
minimized in to a tray icon. But if I turn off this filter, a lot of
irrelevant system processes and other hidden windows will get through as
well. I have no way to tell which one among them is user application, which
one is not.

I noticed that the taskmgr program in windows has the same problem. It
doesn't display the tray icon programs. Instead, it only displays their
processes in the processes list.

I have imagined that if there is API to enumerate the applications that has
a tray icon, it would solve my problem. Or maybe there is a better way to get
the list of user applications rather than using ::EnumWindows, but I have no
clue about it.

So anyone of you has a thought?

Thanks very much!

Jul 11 '06 #1
0 1093

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

by: JuanR | last post by:
Hi I have a Add-In por Office and i need to detect what applications is running during installation.
by: Barry Mossman | last post by:
Hi, can I detect whether my class is running within the context of a Console application, vs say a WinForm's application ? also does anyone know whether the compiler or runtime is smart enough...
by: Mike Stephens | last post by:
I have an application to minimizes when X is clicked. If the user wants to close the application they click the Exit Application button.This works fine and does exactly what I need. I have since...
by: Steven | last post by:
Hi, I have a program that monitors a few running applications. This monitoring program does not itself start these running applications. My question is how can the monitoring program detect that...
by: Patrick Dugan | last post by:
I have an vb.net application that is a module that uses a "application.run" in the sub main to start. There is no form involved (just a system tray icon) How can you detect when the application...
by: Frank L | last post by:
I have some accounting and tax receipting type applications, developed for charitable and non profit groups, that are exhibiting strange behaviour on a few of the 30 or 40 user machines. When...
by: SeC | last post by:
Hi. Is there any way to detect if application is being killed by 'End Process' via Task Manager ?
by: Don | last post by:
I wrote an app that alerts a user who attempts to open a file that the file is currently in use. It works fine except when the file is opened by Notepad. If a text file is opened, most computers...
by: Bassem | last post by:
I'm working on simple chat program via serial port. It works fine, but i face this problem. When i try to open the exe, UnauthorizedAccess exception occurs, i can't use COM1 becuase someone else has...
by: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 4 Oct 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
by: Aliciasmith | last post by:
In an age dominated by smartphones, having a mobile app for your business is no longer an option; it's a necessity. Whether you're a startup or an established enterprise, finding the right mobile app...
by: NeoPa | last post by:
Hello everyone. I find myself stuck trying to find the VBA way to get Access to create a PDF of the currently-selected (and open) object (Form or Report). I know it can be done by selecting :...
by: Teri B | last post by:
Hi, I have created a sub-form Roles. In my course form the user selects the roles assigned to the course. 0ne-to-many. One course many roles. Then I created a report based on the Course form and...
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 1 Nov 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM) Please note that the UK and Europe revert to winter time on...
by: nia12 | last post by:
Hi there, I am very new to Access so apologies if any of this is obvious/not clear. I am creating a data collection tool for health care employees to complete. It consists of a number of...
by: isladogs | last post by:
The next online meeting of the Access Europe User Group will be on Wednesday 6 Dec 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, Mike...
by: GKJR | last post by:
Does anyone have a recommendation to build a standalone application to replace an Access database? I have my bookkeeping software I developed in Access that I would like to make available to other...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.