Show Running Applications in VB.NET
Submitted by donbermoy on Friday, April 24, 2015 - 23:32.
For the past months, I already made a tutorial regarding on showing all the process of computer with this link http://www.sourcecodester.com/tutorials/visual-basic-net/6763/show-lists-computer-process-vbnet.html. Now, in this tutorial, i will create a program that all your opened computer applications will be displayed.
Now, let's start this tutorial!
1. Let's start with creating a Windows Form Application for this tutorial by following the following steps in Microsoft Visual Studio: Go to File, click New Project, and choose Windows Application.
2. Next, add only one ListView in your Form named applist that has two columns labeled Task and Status.
You must design your layout like this:
3. Now, we will code for our program.
Put this code in your Form_Load:
First, we will clear the items in the ListView. Then create a For Each loop with a variable named p as a Process. If the process has the main window title then we will show and add the items of the listview and displaying all the applications that are opened. Then on the second column,it will display "running".
- Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
- applist.Items.Clear()
- For Each p In Process.GetProcesses
- If p.MainWindowTitle <> "" Then
- Dim app As ListViewItem = applist.Items.Add(p.MainWindowTitle)
- app.SubItems.Add("running")
- End If
- Next
- End Sub
Output:
For more inquiries and need programmer for your thesis systems in any kind of programming languages, just contact my number below. Best Regards, Engr. Lyndon Bermoy IT Instructor/System Developer/Android Developer/Freelance Programmer Mobile: 09488225971 Landline: 826-9296 E-mail:[email protected] Add and Follow me on Facebook: https://www.facebook.com/donzzsky Visit and like my page on Facebook at: https://www.facebook.com/BermzISwareAdd new comment
- 1273 views