?
Solved

Get the "Running Program List" in C# Compact Framework

Posted on 2004-08-29
5
Medium Priority
?
3,136 Views
Last Modified: 2012-08-13
Within a C# application running on a Pocket PC -- I would like to get a listing of the currently running applications -- i.e., the same ones that show up in the "Runnig Program List" under the "Settings"->"Memory".

Just need to stick the results into arraylist or the like -- and look for a specific application name.  Then if it's not running -- need to launch the application.
0
Comment
Question by:LanceWLarsen
  • 2
4 Comments
 
LVL 4

Expert Comment

by:NTAC
ID: 11925827
Here is something that mihgt do what you want:

                  Process[] pArray = System.Diagnostics.Process.GetProcesses();

                  bool startProc = true;
                  foreach ( Process proc in pArray)
                  {
                        if( proc.ToString().equals(yourNameYouWantToCheck) )
                        {      
                              startProc = false;
                              break;
                        }

                  }
                  if( startProc )
                System.Diagnostics.Process.Start("c:\\yourFilename.exe");
0
 
LVL 4

Expert Comment

by:NTAC
ID: 11925829
The Process.GetProcesses() willl return a list of running procs.  Then you can check it from there, and if not found--it will start the application you want.  Good luck on your program.
0
 

Author Comment

by:LanceWLarsen
ID: 11938379
Hmm... tried that -- but seems as if the System.Diagnostics.Process method does not exist in the Compact Framework... ideas?  Is there an alternate way to access the processes in the Compact Famework?

Thanks tons...
0
 
LVL 7

Accepted Solution

by:
God_Ares earned 1000 total points
ID: 11950169
I think you going to thank me for this one,...

http://69.93.124.180/opennetcf/forums/topic.asp?TOPIC_ID=1482

ever head of opennetcf? www.opennetcf.org it's a downloadable libary. I suggest you serious look at it,.. (soooo trying no to use caps,..)

with use of opennetcf.org the code submitted by NTAC + few mods = success


regards Floris Briolas
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

In order to hide the "ugly" records selectors (triangles) in the rowheaders, here are some suggestions. Microsoft doesn't have a direct method/property to do it. You can only hide the rowheader column. First solution, the easy way The first sol…
Entity Framework is a powerful tool to help you interact with the DataBase but still doesn't help much when we have a Stored Procedure that returns more than one resultset. The solution takes some of out-of-the-box thinking; read on!
Are you ready to place your question in front of subject-matter experts for more timely responses? With the release of Priority Question, Premium Members, Team Accounts and Qualified Experts can now identify the emergent level of their issue, signal…
Loops Section Overview
Suggested Courses

840 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