Solved

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

Posted on 2004-08-29
5
2,980 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
5 Comments
 
LVL 4

Expert Comment

by:NTAC
Comment Utility
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
Comment Utility
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
Comment Utility
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 250 total points
Comment Utility
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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Article by: Ivo
C# And Nullable Types Since 2.0 C# has Nullable(T) Generic Structure. The idea behind is to allow value type objects to have null values just like reference types have. This concerns scenarios where not all data sources have values (like a databa…
Introduction This article series is supposed to shed some light on the use of IDisposable and objects that inherit from it. In essence, a more apt title for this article would be: using (IDisposable) {}. I’m just not sure how many people would ge…
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

728 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

8 Experts available now in Live!

Get 1:1 Help Now