---
title: "How to show all application in C#"  
description: "In this blog I am trying to make a small demo which is show all running application in C#.In this article I use the Process property and get all runni"  
author: "Vijay Shukla"  
published: 2013-06-17  
updated: 2014-09-18  
canonical: https://www.mindstick.com/blog/529/how-to-show-all-application-in-c-sharp  
category: "c#"  
tags: ["c#"]  
reading_time: 2 minutes  

---

# How to show all application in C#

In this blog I [am trying](https://answers.mindstick.com/qa/36834/which-two-programming-languages-should-i-master-in-if-i-am-trying-to-get-into-google-or-facebook) to make a small demo which is show all running [application in C#](https://www.mindstick.com/forum/33721/how-to-create-columns-in-datagridview-windows-application-in-c-sharp).

In this [article](https://www.mindstick.com/articles/95867/are-you-looking-for-500-credit-score-mortgage-lenders-houston-continue-reading-this-article) I use the Process [property](https://www.mindstick.com/blog/205/property-notification-in-c-sharp) and get all running application use Process.GetProcesses() method below I am creating a demo [project](https://www.mindstick.com/articles/105927/how-to-excel-at-managing-multiple-projects) which is shows all running [application process](https://www.mindstick.com/interview/2569/when-does-android-start-and-end-an-application-process) name with memory size and main window title in a [datagridview](https://www.mindstick.com/articles/607/working-with-datagridview-in-vc-sharp):-

##### Steps for creating demo project:-

1. Create a new project New >> Project (give the appropriate name of project).

2. Now by default show a form1, in form1 [drag and drop](https://www.mindstick.com/forum/454/how-to-drag-and-drop-multiple-image-from-one-canvas-to-onther-canvas-in-html5) a datagridview where shows all running application.

3. Now [double click](https://www.mindstick.com/forum/155692/what-is-dfp-double-click-for-publisher) on the form1 and get the form load event.

4. In the form load event write the below code.

```
  private void Form1_Load(object sender, EventArgs e)  {  foreach (System.Diagnostics.Process p in System.Diagnostics.Process.GetProcesses())
  {  if (p.MainWindowTitle.Length > 0)  {  string MainWindowName = p.MainWindowTitle.ToString();  string ProcessName = p.ProcessName.ToString();  string MemorySize = p.PrivateMemorySize64.ToString(); dgvApplicationList.Rows.Add(MainWindowName, ProcessName, MemorySize);
 } } }
```

##### Code Description:-

##### 1. This is the form load event method.

##### \
3. This is foreach loop, this loop will run while Process.GetProcesses()

##### method returns values.

##### \
5. This line of code check your main window title length if length is

##### greater than 0 then if condition body will execute.

##### \
7. This line of code gets the running application main window name and

##### assign on string MainWindowName variable.

##### \
8. This line of code gets the running application Process name and

##### assign on string ProcessName variable.

##### \
9. This line of code gets the running application memory size and assign

##### on string MemorySize variable.

##### \
10. This line of code set the value in datagridview.

##### Output Screenshot:-

![How to show all application in C#](https://www.mindstick.com/blogs/df0371aa-6715-4b90-88c8-39b8c56049db/images/51f93739-c9cb-49c7-bca1-53e9ac0fb2e2.png)

---

Original Source: https://www.mindstick.com/blog/529/how-to-show-all-application-in-c-sharp

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
