Print Page | Close Window

32-bit icons in tree view/toolbar

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Toolkit Pro
Forum Description: Topics Related to Codejock Toolkit Pro
URL: http://forum.codejock.com/forum_posts.asp?TID=320
Printed Date: 19 May 2024 at 8:07am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: 32-bit icons in tree view/toolbar
Posted By: Unormal
Subject: 32-bit icons in tree view/toolbar
Date Posted: 31 December 2003 at 1:36pm

Anyone know of a good way to get 32 bit icons/bitmaps in toolbars / treeviews?

Thanks!




Replies:
Posted By: caiden1347
Date Posted: 28 January 2004 at 2:08pm

Was having a similar problem...

Try this solution (WinXP only using Studio.NET 2003):

1)  Add '.manifest' file to application (see http://www.dotnet247.com/247reference/msgs/11/59317.aspx - http://www.dotnet247.com/247reference/msgs/11/59317.aspx ).  This enables WinXP styles in the app.

2)  Add an empty ImageList to your form, to be used with your toolbar.  Add icons to your ImageList and assign these to your toolbar.  The icons will not appear correctly (8 bit alpha will show as 1 bit blackness).  This is just so you can preview the icons in the designer.

3)  In your code, do the following:

imageList.Images.Clear();

Icon icon = new Icon(fileName);

imageList.Images.Add(icon); // For each icon you are using

 

Hope this helps...

-Matt




Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net