Question Get name of each new runned process !

Romeo12

Active member
Joined
Jul 15, 2009
Messages
25
Programming Experience
Beginner
Hey



I'm sure you guys can help me, and i'm sure this is not to hard, but i also spend i hours to make this myself, but i fail ....


So, i want a program, that, when i run it, to write in a textbox, all new process that are runned !


Example : i open notepad : and i want notepad.exe to be in that textbox1.text from my program ....

but i can't do this, so i need some help !

Thanks !
 
Bump
 
You could call Porcess.GetProcesses intermittently using a Timer, but I'm not aware of any way to be notified when a new process starts and exits. That's not to say that there isn't a way though. It might be possible using WMI or there might be some system event you can hook into. No idea what it might be though.
 
ATM i have this :
VB.NET:
        Dim ProcessList As System.Diagnostics.Process()
        ProcessList = System.Diagnostics.Process.GetProcesses()
        Dim Proc As System.Diagnostics.Process



        For Each Proc In ProcessList
            TextBox1.AppendText(Proc.ProcessName + vbNewLine)
        Next
But if i put this into a timer, will write all process evry *time interval*

But i also think to make this, and to check if the process from textbox1 is = to process from textbox2 ( textbox2 should be another timer that write all processes ) and check if there are new processes, and write new one in other textbox ....
but dosn't work very well ... Help ?
 
Just don't append. Replace instead.

But if i replace, it will show me the last process : that is Idle
and if i put it into a timer, it will write/replace all processes, and now, i don't know how to make it to verif evry process from that textbox, to the new processes, and write them ...

I thinked at If textbox1.text = textbox2.text ( textbox2 should be the actualy process list, and textbox1 the textbox that write all processes, in a timer) Then
textbox3.text = ?



Not sure ....
 
Back
Top