View Single Post
Old June 9th, 2009   #32 (permalink)
@ruantec
Emu author
 
@ruantec's Avatar
 
Join Date: Nov 2002
Location: Austria (originally from Dominican Republic)
Posts: 2,380
Quote:
Originally Posted by S.T.A.R.S. View Post
That does shows the extensions,but it's not showing my currently active processes like WMP and so on...lol.
lol you have wishes

by accessing the main module you can get all the info you need... anyways here you go.

Code:
        private void button1_Click(object sender, EventArgs e)
        {
            Process[] procs = Process.GetProcesses(".");
            foreach (Process process in procs)
            {
                try
                {
                    if (process.MainWindowTitle.Length > 0)
                    {
                        listBox1.Items.Add(process.MainModule.ModuleName);
                        //foreach (ProcessModule modul in process.Modules)
                        //{
                        //    listBox1.Items.Add(modul.ModuleName);

                        //    //Here some more in case you need them
                        //    //modul.FileName + Environment.NewLine;
                        //    //modul.ModuleMemorySize.ToString();
                        //    //modul.FileVersionInfo.FileVersion;
                        //}
                    }
                }
                catch { }
            }
        }
__________________

Current development tools:

Visual C++.net, Visual C#.net
Visual VB.net, Visual Webdeveloper.net
Bloodshed Dev C++, Borland C++
Visual Basic 6
@ruantec is offline   Reply With Quote