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

C#

 
QuestionSending WM_CONTEXTMENU Pin
cmaissan18-Oct-06 16:23
cmaissan18-Oct-06 16:23 
QuestionHow to Check when a computer is connected to internet Pin
FlyOnIT18-Oct-06 15:55
FlyOnIT18-Oct-06 15:55 
AnswerRe: How to Check when a computer is connected to internet Pin
seee sharp19-Oct-06 21:46
seee sharp19-Oct-06 21:46 
GeneralRe: How to Check when a computer is connected to internet Pin
FlyOnIT23-Oct-06 6:29
FlyOnIT23-Oct-06 6:29 
QuestionStructLayoutAttribute and type safety Pin
Vega0218-Oct-06 14:30
Vega0218-Oct-06 14:30 
GeneralRe: StructLayoutAttribute and type safety Pin
Werdna19-Oct-06 7:03
Werdna19-Oct-06 7:03 
GeneralRe: StructLayoutAttribute and type safety Pin
Vega0219-Oct-06 16:48
Vega0219-Oct-06 16:48 
QuestionProcess.ProccessName coming up idle in seperate thread. Pin
Sunset Towers18-Oct-06 12:02
Sunset Towers18-Oct-06 12:02 
I have a listbox I am trying to show the process information in. I'm attempting to fill the listbox dynamically via a new thread as the code below shows.

private void Form1_Load(object sender, EventArgs e)
{
new Thread(new ThreadStart(UpdateProcessList)).Start();
}


private void UpdateProcessList()
{
Process[] OldProcesses = new Process[1];
Process[] NewProcesses = Process.GetProcesses();
while (p_DemoClosing == false)
{
if (OldProcesses.Equals(NewProcesses) == false)
{
ProcessList.BeginInvoke((MethodInvoker)delegate
{
ProcessList.Items.Clear();
});
NewProcesses = Process.GetProcesses();
foreach (Process DisplayProcess in NewProcesses)
{
ProcessList.BeginInvoke((MethodInvoker)delegate
{
ProcessList.Items.Add(DisplayProcess.ProcessName);
});
}
OldProcesses = NewProcesses;
}
Thread.Sleep(50);
}
}

Everytime the script runs no matter what I do all the .ProccessName's say idle rather than displaying the actual name. Once I attempt to get the processes IE for the first display they all come up with a processname of "Idle".
GeneralRe: Process.ProccessName coming up idle in seperate thread. [modified] Pin
Anthony Mushrow18-Oct-06 13:55
professionalAnthony Mushrow18-Oct-06 13:55 
AnswerRe: Process.ProccessName coming up idle in seperate thread. Pin
Anthony Mushrow18-Oct-06 14:24
professionalAnthony Mushrow18-Oct-06 14:24 
GeneralRe: Process.ProccessName coming up idle in seperate thread. Pin
Sunset Towers18-Oct-06 15:10
Sunset Towers18-Oct-06 15:10 
Questionmake a class property an array of an instantiated class? Pin
mmatteson18-Oct-06 11:56
mmatteson18-Oct-06 11:56 
AnswerRe: make a class property an array of an instantiated class? Pin
Christian Graus18-Oct-06 11:59
protectorChristian Graus18-Oct-06 11:59 
GeneralRe: make a class property an array of an instantiated class? Pin
mmatteson19-Oct-06 6:10
mmatteson19-Oct-06 6:10 
AnswerRe: make a class property an array of an instantiated class? Pin
Andrew Rissing18-Oct-06 12:16
Andrew Rissing18-Oct-06 12:16 
GeneralRe: make a class property an array of an instantiated class? Pin
mmatteson18-Oct-06 16:32
mmatteson18-Oct-06 16:32 
QuestionGraphics Pin
Areff18-Oct-06 10:59
Areff18-Oct-06 10:59 
AnswerRe: Graphics Pin
Christian Graus18-Oct-06 11:03
protectorChristian Graus18-Oct-06 11:03 
GeneralRe: Graphics Pin
Areff18-Oct-06 11:12
Areff18-Oct-06 11:12 
GeneralRe: Graphics Pin
Christian Graus18-Oct-06 11:33
protectorChristian Graus18-Oct-06 11:33 
GeneralRe: Graphics Pin
V.19-Oct-06 4:51
professionalV.19-Oct-06 4:51 
AnswerRe: Graphics Pin
V.19-Oct-06 4:50
professionalV.19-Oct-06 4:50 
AnswerRe: Graphics Pin
Bekjong19-Oct-06 5:37
Bekjong19-Oct-06 5:37 
QuestionObjectDisposedException Pin
Yustme18-Oct-06 9:47
Yustme18-Oct-06 9:47 
AnswerRe: ObjectDisposedException Pin
Christian Graus18-Oct-06 10:02
protectorChristian Graus18-Oct-06 10:02 

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.