Windows Develop Bookmark and Share   
 index > Windows Forms General > Missing toolbar icons in print preview dialog
 

Missing toolbar icons in print preview dialog

Hello,

 I'm developing a C# application. Initially I had a Windows.Form object with (among other members) a PrintPreviewDialog data member, and this dialog worked just fine: all the toolbar buttons in the print preview dialog displayed the icons correctly. Then I added a Toolbar and an ImageList object to my form, added two .ico files to the ImageList object, and associated the toolbar buttons with the items of the ImageList object. I thought everything was fine because the icons in the toolbar buttons appeared immediately in the development environment. Then I ran the program, and neither the toolbar buttons of my form, nor the toolbar buttons in the preview dialog were displayed. The buttons themselves were actually on the toolbar, they were fully functional, but for some reason, the images were not drawn in the buttons. When I removed the Toolbar and the ImageList objects from my form, the print preview dialog displayed its toolbar buttons correctly again.

  Each icon file contains a 16*16/16 and a 16*16/256 color icon. I tried to set the ColorDepth property of the ImageList object to 4bit and 8 bit, but neither worked.

  Can you give me any help?

Thank You
Peter
MigrationUser 1  Friday, February 25, 2005 4:56 AM
Are you using EnableVisualStyles()? If so, check out this thread: <a href="http://www.windowsforms.net/Forums/ShowPost.aspx?tabIndex=1&tabId=41&PostID=18974">EnableVisualStyles and NotifyIcon bug</a>
MigrationUser 1  Monday, February 28, 2005 8:37 AM
Yes, I'm using EnableVisualStyles(), and the thread you specified was very much helpful! Thank You!
MigrationUser 1  Tuesday, March 01, 2005 8:13 AM
I dont use EnableVisualStyles(), and still have the same problem.
No icons in toolbar buttons in PrintPreviewDialog.
Here is the screenshot:
http://www.brandbit.com/images/PrintPreviewBug.JPG
Please help
bobiav  Friday, July 22, 2005 12:42 PM
No one can help me?
bobiav  Thursday, July 28, 2005 12:22 PM

You can use google to search for other answers

Custom Search

More Threads

• Treeview control
• Read HTML file into an Object for parsing contents?
• label1 Text Length\Width
• Custom Controls COMException Reference
• Dynamically adding the controls to the tabpages using ado.net in c#
• MainMenu Control with Color Properties
• How to remove properly using RemoveAt() for ListView
• Office Vba versus .net windows forms
• Using Font Dialog to change font
• problem Closing application