none
How do i get a list of user initiated processes (i.e. those which appear in taskbar) using VB.NET RRS feed

  • Question

  • Im trying to create a program similar in utility to the windows taskbar. So far, the code that i have tried retrieves all processes. I just want to display the processes which appear in the taskbar.

    Friday, March 13, 2020 8:34 AM

All replies

  • The windows in the Taskbar are got from EnumDesktopWindows

    by filtering them from style (mainly WS_VISIBLE) and extended style (<> WS_EX_TOOLWINDOW for example)

    Friday, March 13, 2020 8:52 AM
  • Hi at19AV20,

    Thank you for posting here.

    In order to get the process names of applications in taskbar, you can try the following code:

            Dim processes As Process() = Process.GetProcesses()
    
            For Each item In processes
                If item.MainWindowTitle.Length > 0 Then Console.WriteLine(item.MainWindowTitle)
            Next

    Hope it can help you. 

    Best Regards,

    Xingyu Zhao


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Monday, March 16, 2020 5:51 AM
    Moderator
  • Hi at19AV20,

    How is the question going? Please let me know if you need further assistance.

    Best Regards,

    Xingyu Zhao


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Wednesday, March 25, 2020 8:59 AM
    Moderator