| Richard T. Edwards 2005-10-14, 7:57 am |
| Try this line:
System.Windows.Forms.MessageBox.Show(Process.GetCurrentProcess().ProcessName.ToString());
"Tomas Vera" <tavera@NO_SPAM_sbcglobal.net> wrote in message
news:l1vrk19a8gvphl0j4oj1o8v1hdha5o84bn@
4ax.com...
> Hello All,
> I'ma having trouble getting GetCurrentProcess() to work properly.
> What I'm trying to accomplish is list all running processes. But my
> call get GetProcesses() hangs.
>
> While testing things out I found that the tiny program listed below
> hangs as well.
>
> Am I missing something?
>
> -tomas
>
>
> //---- This app hangs ----
> using System;
> using System.Diagnostics;
>
> namespace proctest
> {
>
> class Class1
> {
>
> [STAThread]
> static void Main(string[] args)
> {
>
> Console.WriteLine(Process.GetCurrentProcess().ProcessName);
> }
> }
> }
>
> // -- What's wrong with this code?
>
>
>
> /*-------------------------------
> * Tomas Vera
> * tomas (at) sbcglobal (dot) net
> *-------------------------------
> */
|