Click here to Skip to main content
15,891,905 members
Home / Discussions / C#
   

C#

 
QuestionProcess.GetProcesses() Pin
Seraphin21-May-06 9:34
Seraphin21-May-06 9:34 
AnswerRe: Process.GetProcesses() Pin
Ed.Poore21-May-06 11:45
Ed.Poore21-May-06 11:45 
GeneralRe: Process.GetProcesses() Pin
Seraphin22-May-06 3:51
Seraphin22-May-06 3:51 
GeneralRe: Process.GetProcesses() Pin
Ed.Poore22-May-06 9:33
Ed.Poore22-May-06 9:33 
GeneralRe: Process.GetProcesses() Pin
Seraphin24-May-06 1:58
Seraphin24-May-06 1:58 
GeneralRe: Process.GetProcesses() Pin
Ed.Poore24-May-06 3:52
Ed.Poore24-May-06 3:52 
GeneralRe: Process.GetProcesses() Pin
Seraphin7-Jun-06 23:14
Seraphin7-Jun-06 23:14 
GeneralRe: Process.GetProcesses() Pin
Ed.Poore8-Jun-06 8:28
Ed.Poore8-Jun-06 8:28 
Seraphin wrote:
Try to open 2 or more SharpDevelop Instances and you'll see that you only get one of them.

Nope I get all processes running as listed in the TaskManager Confused | :confused:

Seraphin wrote:
First get the ThreadID with the Win32 API and then get the ProcessByID, this works.

Seems a long way around.

Try putting the following code:
using System;
using System.Diagnostics;

class ListProcesses
{
    static void Main(string[] args)
    {
        foreach (Process proc in Process.GetProcesses())
        {
            Console.WriteLine(proc.ProcessName);
        }
        Console.Write("Press ENTER to continue...");
        Console.ReadLine();
    }
}
Into a text file, name it something (like listprocesses.cs) then run csc listprocesses.cs to compile it and then run listprocesses.exe.

I just had a thought, are you running in a doman because maybe there's some security restriction in place which stops programs accessing other programs.  Just a possibility?





You know you're a Land Rover owner when the best route from point A to point B is through the mud.

Ed
QuestionHow to bind exe file(s) To an exe file programmatically ?? Pin
hdv21221-May-06 8:42
hdv21221-May-06 8:42 
AnswerRe: How to bind exe file(s) To an exe file programmatically ?? Pin
Ed.Poore21-May-06 11:43
Ed.Poore21-May-06 11:43 
QuestionRegex question Removing trailing CR or LF Pin
kago51221-May-06 7:55
kago51221-May-06 7:55 
AnswerRe: Regex question Removing trailing CR or LF Pin
Ed.Poore21-May-06 11:49
Ed.Poore21-May-06 11:49 
AnswerRe: Regex question Removing trailing CR or LF Pin
leppie21-May-06 18:37
leppie21-May-06 18:37 
QuestionOpen Program In Form Pin
kobi10i1021-May-06 6:41
kobi10i1021-May-06 6:41 
AnswerRe: How do I display only a select portion of the output? Regex? Pin
User 665821-May-06 7:15
User 665821-May-06 7:15 
QuestionClass Library project help? Pin
eric_tran21-May-06 5:19
eric_tran21-May-06 5:19 
AnswerRe: Class Library project help? Pin
Ed.Poore21-May-06 11:56
Ed.Poore21-May-06 11:56 
QuestionHow to Close Right click on flash Pin
mehrdadc4821-May-06 4:04
mehrdadc4821-May-06 4:04 
AnswerRe: How to Close Right click on flash Pin
Ed.Poore21-May-06 11:58
Ed.Poore21-May-06 11:58 
Questioninsert XML to SQL SERVER Pin
eyalso21-May-06 3:28
eyalso21-May-06 3:28 
QuestionlistView to arraylist Pin
teejayem21-May-06 2:49
teejayem21-May-06 2:49 
AnswerRe: listView to arraylist Pin
Ravi Bhavnani21-May-06 5:11
professionalRavi Bhavnani21-May-06 5:11 
GeneralRe: listView to arraylist Pin
teejayem21-May-06 5:49
teejayem21-May-06 5:49 
Questioninherited Panel-Control for RadioButtons only Pin
Subfreq21-May-06 0:42
Subfreq21-May-06 0:42 
AnswerRe: inherited Panel-Control for RadioButtons only Pin
Ravi Bhavnani21-May-06 5:14
professionalRavi Bhavnani21-May-06 5:14 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.