CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 5 of 5
  1. #1
    Join Date
    Oct 2009
    Location
    Holland
    Posts
    201

    Application Icon In Taskbar

    Hi all,

    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)

    regards,

    Gerwin

  2. #2
    Join Date
    Jul 2001
    Location
    Sunny South Africa
    Posts
    11,283

    Re: Application Icon In Taskbar

    Did you set an application icon for your program? Does these dialogs of yours have a control menu?

  3. #3
    Join Date
    Oct 2009
    Location
    Holland
    Posts
    201

    Re: Application Icon In Taskbar

    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.

    so app start show icon.
    app exit remove icon.


    regards,

    gerwin

  4. #4
    Join Date
    Jul 2001
    Location
    Sunny South Africa
    Posts
    11,283

    Re: Application Icon In Taskbar

    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

  5. #5
    Join Date
    Oct 2009
    Location
    Holland
    Posts
    201

    Re: Application Icon In Taskbar

    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...)

    regards,

    G.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured