1

I would like to create a little taskbar application for Windows 10 and 11.

For this application I would like to create a small text next to the taskbar icons at the right.

I've searched how to do this for like 7-10 days now but I found nothing except of this question: C# Display text on the taskbar | Windows 10

Sadly I do not understand how to recreate the accepted answer. Could maybe someone explain it to me? :)

Greetings, Leander

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
LeleEdits
  • 61
  • 6
  • Does this answer help: [How to make a Windows Forms .NET application display as tray icon](https://stackoverflow.com/q/158895/880990)? – Olivier Jacot-Descombes Jul 16 '22 at 13:38
  • 1
    Ideally you should not write shell extensions in .NET. Taskbar band support was removed at some point, at least in 11. – Anders Jul 16 '22 at 13:56

1 Answers1

0

You can create a simple powershell script (using dotnet API) that displays an icon to the taskbar and prints text in a message popup on hovering of the icon with this kind of code:

[void] [System.Reflection.Assembly]::LoadWithPartialName("System.Windows.Forms")
$objNotifyIcon = New-Object System.Windows.Forms.NotifyIcon
$objNotifyIcon.Icon = "$(pwd)/myicon.ico"
$objNotifyIcon.Visible = $true
$objNotifyIcon.Text = "mytext"

You will need to find an .ico file and of course have the dotnet framework installed on your system for this to work.

Here's a project of mine that uses this code, as a practical example: https://github.com/adamency/taskbar-monitor-windows

I don't know how to display text directly on the task bar however.

adamency
  • 682
  • 6
  • 13