I have added a toolbar to my WinForms app. The toolbar has 3 buttons and a
separator. I have associated an imagelist with the toolbar and setup the
images and buttons appropriately.

At design-time I can see the bitmaps on the buttons, but when I run the
application the buttons are blank.

After googling around a bit I saw that some people got around this by making
sure that
this.toolBar.Buttons.AddRange (in InitializeComponent()) came at the very
bottom of the toolbar section. I made this change but it did not affect the
results.

Can anyone think of anything else that might be going wrong here?

Thanks,
Tom

Re: Invisible toolbar buttons by hirf-spam-me-here

hirf-spam-me-here
Thu May 13 01:20:36 CDT 2004

* "Tom Jones" <tomjones16@hotmail.com> scripsit:
> I have added a toolbar to my WinForms app. The toolbar has 3 buttons and a
> separator. I have associated an imagelist with the toolbar and setup the
> images and buttons appropriately.
>
> At design-time I can see the bitmaps on the buttons, but when I run the
> application the buttons are blank.

If you are using Windows XP Visual Styles, call 'Application.DoEvents'
after calling 'Application.EnableVisualStyles'.

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>