VB.Net Windows Display TEXT in Windows Taskbar

Silva, Paul D 1 Reputation point
2022-12-22T18:18:13.433+00:00

Good morning, looking for a little help. I am trying to create an app that once launched will display text in the Windows task bar (Please see attached print screen for example). I down want a windows form to be displayed either. I've been successful in creating an app that displays this text with an icon in the "Sys Tray" using the mouse over function, but this is not what I want. I want to ALWAYS be visible in the Windows Task Bar. Is this possible? If so, can someone please help?

273365-sample.png

VB
VB
An object-oriented programming language developed by Microsoft that is implemented on the .NET Framework. Previously known as Visual Basic .NET.
2,804 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Jiachen Li-MSFT 33,866 Reputation points Microsoft External Staff
    2022-12-23T02:01:23.51+00:00

    Hi @Silva, Paul D ,
    You can use the Win32 API to manipulate a window's taskbar icon to display text.
    Here are some ways to get taskbar-related handles.

    • Desktop icon window handle = FindWindow("Progman", vbNullString)
    • Desktop icon window handle = FindWindowEx(FindWindow("Progman", vbNullString), 0, "ShellDll_DefView", vbNullString)
    • Taskbar window handle Window handle = FindWindow("Shell_TrayWnd", vbNullString)
    • Taskbar start button window handle = FindWindowEx(FindWindow("Shell_TrayWnd", vbNullString), 0, "Button", vbNullString)
    • Taskbar tray notification window handle = FindWindowEx(FindWindow("Shell_TrayWnd", vbNullString), 0, "TrayNotifyWnd", vbNullString)
    • Taskbar toolbar window handle = FindWindowEx(FindWindow("Shell_TrayWnd", vbNullString), 0, "ReBarWindow32", vbNullString)
    • Taskbar program button window handle = FindWindowEx(FindWindowEx(FindWindow("Shell_TrayWnd", vbNullString), 0, "ReBarWindow32", vbNullString), 0, "MSTaskSwWClass", vbNullString)
    • Taskbar clock window handle = FindWindowEx(FindWindowEx(FindWindow("Shell_TrayWnd", vbNullString), 0, "TrayNotifyWnd", vbNullString), 0, "TrayClockWClass", vbNullString)
    • Taskbar quick launch window handle = FindWindowEx(FindWindowEx(FindWindow("Shell_TrayWnd", vbNullString), 0, "ReBarWindow32", vbNullString), 0, "ToolbarWindow32", vbNullString)

    And you can refer to the following link.
    https://stackoverflow.com/a/43942164/17334287
    Best Regards.
    Jiachen Li

    ----------

    If the answer is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.