Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Windows Forms / WinForm General / April 2005

Tip: Looking for answers? Try searching our database.

Toolbar icons

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
John J. Hughes II - 05 Apr 2005 18:57 GMT
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
Mick Doherty - 05 Apr 2005 19:41 GMT
WindowsXP?
VS2003?

Signature

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

>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
[quoted text clipped - 7 lines]
> Regards,
> John
John J. Hughes II - 06 Apr 2005 01:37 GMT
Yes I'm running on WinXP pro SP2 with all patches up to date and VS 2003.

> WindowsXP?
> VS2003?
[quoted text clipped - 10 lines]
>> Regards,
>> John
Mick Doherty - 06 Apr 2005 10:15 GMT
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.

Signature

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

> Yes I'm running on WinXP pro SP2 with all patches up to date and VS 2003.
>
[quoted text clipped - 12 lines]
>>> Regards,
>>> John
John J. Hughes II - 06 Apr 2005 14:33 GMT
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.

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.