I have a toolbar on a windows tab control tab page which is on a form. I
have added three buttons with icons via an image list. The icons display
correctly in the VS and the first time I compile from the runtime. But when
I compile again they vanish from the runtime but still appear correctly in
the VS. I have another form where they display correctly but the toolbar is
on the form itself, not sure if this is the problem.

Any suggestion on how to get the toolbar icons to display correctly?

Regards,
John

Re: Toolbar icons by Mick

Mick
Tue Apr 05 13:41:49 CDT 2005

WindowsXP?
VS2003?

--
Mick Doherty
http://dotnetrix.co.uk/nothing.html


"John J. Hughes II" <no@invalid.com> wrote in message
news:ulDFkjgOFHA.3444@tk2msftngp13.phx.gbl...
>I have a toolbar on a windows tab control tab page which is on a form. I
>have added three buttons with icons via an image list. The icons display
>correctly in the VS and the first time I compile from the runtime. But
>when I compile again they vanish from the runtime but still appear
>correctly in the VS. I have another form where they display correctly but
>the toolbar is on the form itself, not sure if this is the problem.
>
> Any suggestion on how to get the toolbar icons to display correctly?
>
> Regards,
> John
>



Re: Toolbar icons by John

John
Tue Apr 05 19:37:34 CDT 2005

Yes I'm running on WinXP pro SP2 with all patches up to date and VS 2003.

"Mick Doherty"
<EXCHANGE#WITH@AND.REMOVE.SQUAREBRACKETS.[mdaudi100#ntlworld.com]> wrote in
message news:O5n1j8gOFHA.544@TK2MSFTNGP10.phx.gbl...
> WindowsXP?
> VS2003?
>
> --
> Mick Doherty
> http://dotnetrix.co.uk/nothing.html
>
>
> "John J. Hughes II" <no@invalid.com> wrote in message
> news:ulDFkjgOFHA.3444@tk2msftngp13.phx.gbl...
>>I have a toolbar on a windows tab control tab page which is on a form. I
>>have added three buttons with icons via an image list. The icons display
>>correctly in the VS and the first time I compile from the runtime. But
>>when I compile again they vanish from the runtime but still appear
>>correctly in the VS. I have another form where they display correctly but
>>the toolbar is on the form itself, not sure if this is the problem.
>>
>> Any suggestion on how to get the toolbar icons to display correctly?
>>
>> Regards,
>> John
>>
>
>



Re: Toolbar icons by Mick

Mick
Wed Apr 06 04:15:51 CDT 2005

This generally happens with a call to Application.EnableVisualStyles.
Follow the call with a call to Application.DoEvents and make sure that these
calls are made in Sub Main().

An alternative solution is to add a Manifest resource to the App instead of
calling EnableVisualStyles.

If your Icons have an Alpha Channel then you may find that they display
incorrectly. In this case load the imagelist at runtime.

--
Mick Doherty
http://dotnetrix.co.uk/nothing.html


"John J. Hughes II" <no@invalid.com> wrote in message
news:u8uAUDkOFHA.3296@TK2MSFTNGP15.phx.gbl...
> Yes I'm running on WinXP pro SP2 with all patches up to date and VS 2003.
>
> "Mick Doherty"
> <EXCHANGE#WITH@AND.REMOVE.SQUAREBRACKETS.[mdaudi100#ntlworld.com]> wrote
> in message news:O5n1j8gOFHA.544@TK2MSFTNGP10.phx.gbl...
>> WindowsXP?
>> VS2003?
>>
>> --
>> Mick Doherty
>> http://dotnetrix.co.uk/nothing.html
>>
>>
>> "John J. Hughes II" <no@invalid.com> wrote in message
>> news:ulDFkjgOFHA.3444@tk2msftngp13.phx.gbl...
>>>I have a toolbar on a windows tab control tab page which is on a form. I
>>>have added three buttons with icons via an image list. The icons display
>>>correctly in the VS and the first time I compile from the runtime. But
>>>when I compile again they vanish from the runtime but still appear
>>>correctly in the VS. I have another form where they display correctly
>>>but the toolbar is on the form itself, not sure if this is the problem.
>>>
>>> Any suggestion on how to get the toolbar icons to display correctly?
>>>
>>> Regards,
>>> John
>>>
>>
>>
>
>



Re: Toolbar icons by John

John
Wed Apr 06 08:33:16 CDT 2005

Thanks for the response, I don't enable visual styles anywhere in my code
and since the icon is converted to a bitmap when placed in a image list so I
don't understand how the alpha channel applies. I have noted that if I
place the tool bar on the tab instead of the tab page it seem to work
correctly.

Regards,
John.