I have a program in which I want to handle all three states:
- Not displayed on the taskbar, acting just like a widget, like Windows sound, network programs, etc.
- Display on the taskbar - but not at the top. The window will still display the notification area icon and should behave the same as # 1, but also display the window on the taskbar.
- Display on the taskbar with maximum. The window should behave the same as # 2, but now the window will show the topmost one. Note: it should still be minimized, just as clicking on the taskbar icon minimizes the program.
These are my criteria, and I work to ensure that they all work well together, but I canβt make the latest tweaks guess. # 1 is fine - I made it out quite easily. # 2 and # 3 cause more problems.
My first question is: how does Windows handle the user by clicking on the taskbar icon to minimize / switch back to normal? Since I would prefer to imitate this with C # 2 and # 3.
For # 1, I currently hide the window by simply setting Window.Visibilityto Visibility.Hidden. To show the window, call Show()and then Activate().
As I said, for # 2 and # 3 I would like to copy what Windows does when the user clicks on the taskbar icon. I can do it? Or do I need to find another way to do this?
Harry source
share