Partager via


Toolbar icons in Pocket PC 2003 Second Edition

Someone asked in the .NET CF newsgroup about why icons sometimes disappear from their .NET CF form's toolbar when running on Pocket PC 2003 Second Edition.  Here's the reply from a developer on the .NET CF team:

Hello Ben,

The problem is due to a change in behavior in Windows Mobile 2003 SE. The images will be deleted from the toolbar every when the toolbar is removed from the form. This will also occur when you change the MinimizeBox, WindowState or FormBorderStyle properties of the form (changing these properties causes recreation of the form on the native level, which results into removal of the toolbar from the form).

In order to workaround this problem, you can try to set the ImageList property of the toolbar after performing the operations mentioned above.

Hope this helps.
Thank you,
Sergiy.

[Author: Robert Levy]

Comments

  • Anonymous
    August 13, 2004
    Ive tried to reset the imagelist property, but this is still not helping. In fact I can't seem to get ANY images anytime to display correctly in the toolbar on SE devices.
  • Anonymous
    August 27, 2004
    The same issue occurs if you are building the toolbar in the form's constructor. The image is not displayed. Using another trigger and setting the ImageList property works in this case also.
  • Anonymous
    August 27, 2004
    Certainly, if you are creating the toolbar in the form constructor (per my message above) and it ends up not being displayed, that is considered a bug, not simply a change in behavior, right?
  • Anonymous
    February 08, 2006
    There is a fix, stupid as it is. This worked for me too...

    "Well, I think that I found a solution, at least it worked for me. This  
    will sound stupid but after reading ms support I found a tip talking about  
    another similar situation and following that tip I went and moved the code  
    under


    'ImageList1
    '
    '
    'ToolBar1
    '
    'ToolBarButton1


    in the Sub InitializeComponent()


    I moved to the end of that same sub. And surprise! That worked! "
  • Anonymous
    September 01, 2006
    The fix from Saul work for me.