IT KNOWLEDGE

IT KNOWLEDGE
BC

Tuesday, May 20, 2014

How To Show All Application Running in One Textbox (VB.Net)

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





Please Give Us Your 1 Minute In Sharing This Post!
SOCIALIZE IT →
FOLLOW US →
SHARE IT →
Powered By: itech-9999

0 comments: