There are a lot of ways to see All Apps running in our computer. You can use Task Manager of Microsoft Window or another Scripts/Languages to view them. In this tutorial, we will develop very small app to view all Apps running in our computer show in one Textbox.
We use Controls and Design Application as below:
No | Control Type | Name | Text |
1 | Listbox | ListboxShowAll | |
2 | Button | ButtonAllRunningApp | Show All Running Applications |
Code
Imports System.Text
Imports System.Management
Public Class Form1
Public Shared Function getApplications() As String
Dim s As New StringBuilder()
Dim p As New Process()
For Each p In Process.GetProcesses(".")
Try
If p.MainWindowTitle.Length > 0 Then
s.Append("Window Title of Application Running : " + p.MainWindowTitle.ToString() + Environment.NewLine)
s.Append("Process Name : " + p.ProcessName.ToString() + Environment.NewLine)
s.Append(Environment.NewLine)
End If
Catch
End Try
Next
Return s.ToString()
End Function
Private Sub ButtonAllRunningApp_Click(sender As Object, e As EventArgs) Handles ButtonAllRunningApp.Click
TextBoxListAllApp.Text = getApplications()
End Sub
End Class
0 comments:
Post a Comment