admin管理员组

文章数量:1392068

We have a number of automations at work built as console applications. For some reason it only recently came up that our admins would appreciate it if the status of a given automation was visible from the Taskbar.

In GUI apps this would be accomplished most likely with an Overlay but in searching the internet I'm having a hard time finding any definitive answer to whether it's possible in a Console application.

In experimenting with it, it seems like the Windows Shell overrides everything to make all console apps show the generic console icon but I don't feel like I know all the nooks and crannies enough to declare it impossible.

We're not looking for Tray icons, we're looking for Taskbar specifically.

Anyone have a definitive answer and/or working examples?

I've built a testbed application with WinForms to get a feel for the Overlay and how that works enough to understand the basic of how it's usually done. A custom icon + overlay is easy enough here.

I've not found any exposed API or namespace within a Console app that lets me change the icon displayed while running even to a static image. The only hooks for "Icon" in the Console app changes the icon displayed for the .exe in File Explorer but even that doesn't display while running.

本文标签: Net Console ApplicationIs it possible to set the Taskbar Icon or OverlayStack Overflow