Click here to Skip to main content
15,891,136 members
Please Sign up or sign in to vote.
1.00/5 (5 votes)
See more:
Hiiiii...

I got the list of running application in my task bar for Example:sql,Visual studio ,notepad,Mozilla,
BUT how to know which application open in current monitor screen

C#
ArrayList programlist = new ArrayList();
            Process[] procList = Process.GetProcesses();

            for (int i = 0; i < procList.Length; i++)
            {
                if (procList[i].MainWindowHandle != IntPtr.Zero)
                {
                    programlist.Add(procList[i].ProcessName + "\t" +
                    procList[i].MainWindowTitle);
                }

            }


plz help me.
thanks
Posted
Updated 3-May-12 19:57pm
v2
Comments
Vipin_Arora 1-May-12 1:48am    
Do u want a counter on each click on Windows form??
Sandeep Mewara 1-May-12 4:16am    
Once again,
Here is what is expected of enquirers:
1. TRY first what you want to do!
2. Formulate what was done by you that looks like an issue/not working.

Try them and tell if you face issues.
Members will be more than happy to help like this.
ZurdoDev 2-May-12 10:48am    
Reason for my vote of 1
Not at all clear.
Manfred Rudolf Bihy 4-May-12 3:34am    
Reason for my vote of 1
Now what for the love of god does the title o this non-question have to do with the content? Please clarify!
[no name] 4-May-12 7:37am    
Reason for my vote of 1
Title of the question and content are not related. No question asked. Problem not clearly stated.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900