how do I place the Application Icon in the Taskbar?
I place the 'App Icon' in the taskbar using the options ShowIcon and ShowInTaskbar when displaying a dialog.
So when I call a dialog the icon is nicely placed in the taskbar, but when I hide this dialog and call an new dialog.
the icon dissapears of course dialog hides and comes on again when the next dialog is visible.
So what i want is a steady icon in the taskbar as long as my app is running.
So independent of the dialogs passing by (Showing and/or hiding)
I set the App. Icon (If I build the App. I see the correct Icon in the Windows Explorer.)
The dialogs I use have no control menu.
To give you an idea.
The App. starts with a Splash dialog, the App icon is visible in the task bar.
after several seconds this dialog closes (Using Close()) and the Icon disappears from the taskbar.
now the main menu dialog is displayed, and the app. Icon appears again in the taskbar.
Now you can select one of 9 sub menus if you pick one the main menu wil be hiden (using this.hide()) and the task bar icon dissapears also.
the the submenu dialog is then displayed, and the app. icon shows up again in the task bar.
I want to get rid of the traffic light on and off taskbar icon behaviour.
The icon has to remain steady in the taskbar as long as the app. is running.
regardsless of the dialogs displayed on the screen.
You have to set the Icon property for each form as well. Remember, although it is one program, it is still multiple windows that appear in the Taskbar. Each windows has to have the icon property set to your icon.
Another option would be to have an MDI program. MDI means multiple document interface. This means that one big window remains open the whole time while the other windows could open and close at any time. This is similar to Microsoft Word, or Excel.
If your Forms' Bordestyle is set to FixedToolWindow or SizableToolWindow you will not have a ControlBox on the form, otherwise there will be such a property which you could set to true or false, giving the icon
I have set the icon property for each dialog/form the icons are visible but I do not like the flashy type...
On the other hand I wonder if there is another possibility like NotifyIcon, as all the dialogs/form are subject to program.cs.
So If I can find a routine to set the icon in program.cs this will do the trick.
(i found such a routine for NotifyIcon...)