Best practice for managing application icons...
 
Home My Account Forum Try It! Buy It!
About Contact Us Site Map
StrataFrame Forum
Home      Members   Calendar   Who's On
Welcome Guest ( Login | Register )
      



Best practice for managing application...Expand / Collapse
Author
Message
Posted 05/11/2008 9:14:25 PM
StrataFrame User

StrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame User

Group: StrataFrame Users
Last Login: 07/16/2008 12:26:47 PM
Posts: 405, Visits: 1,682
Hi,

I am getting an icon collection to use with my .NET projects, and wonder what is the best way to work with the icons, by having an Icon Library or just adding needed icons per form in an imagelist control?

Edhy Rijo
Progytech (Computer Consultants)
Post #16307
Posted 05/11/2008 9:35:28 PM


Advanced StrataFrame User

Advanced StrataFrame UserAdvanced StrataFrame UserAdvanced StrataFrame UserAdvanced StrataFrame UserAdvanced StrataFrame UserAdvanced StrataFrame UserAdvanced StrataFrame UserAdvanced StrataFrame User

Group: StrataFrame Users
Last Login: Yesterday @ 11:50:18 PM
Posts: 597, Visits: 13,204
Good question, I have added mine to my project via resource file.
Post #16310
Posted 05/11/2008 9:55:34 PM


StrataFrame Developer

StrataFrame Developer

Group: StrataFrame Developers
Last Login: Yesterday @ 9:36:54 PM
Posts: 4,200, Visits: 4,251
This can get somewhat complicated as your application gets bigger...and inevitabely you end up adding the same icons to the same application more than once.  So what we try to do is create resource files within the projects that pertain to their purpose versus putting them all in the project resource file.  Also, when you import an image, be sure to set it to Embedded and then delete the icon or image file from teh resources folder (don't worry this is just copied over when added to the project and once embedded, you don't need it).

For example, I will create one icon resource file calle common that will have my Add, edit, delete type of icons that I will use over and over again.  Then when I choose the image on a control (aside from an Image Key, which I will get to) I will choose from the Local resources, choose the Common resource, select the image, and done.  This is also realy nice so if you want to change your Add image down the road....you only have to go to one place.

Next, when using an image control, it is best to programmatically load the control.  This is actually so that the images to not degrade fter a few builds.  If you'll notice, the images will eventually e at a 256 quality (or worse in some cases) if the images are added to the image list through the designer.  It may not show up immediately, but they will eventually start to look bad.  So I generally create a method called LoadImages and jut programmatically loads the images into the control from my resource files ( just one image per line usually).  This way my icons always look crisp and clean....so this will probably be a future SF control so that this won't happen, but for now this is really the best way.  Then you can just assign the image keys and/or indexes when using an image list control.

Post #16315
Posted 05/12/2008 10:04:48 AM
StrataFrame User

StrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame User

Group: StrataFrame Users
Last Login: 07/16/2008 12:26:47 PM
Posts: 405, Visits: 1,682
Thanks Trent, Keith,

I will try adding the additional resource files to use the new icons.

Edhy Rijo
Progytech (Computer Consultants)
Post #16329
« Prev Topic | Next Topic »


Reading This TopicExpand / Collapse
Active Users: 0 (0 guests, 0 members, 0 anonymous members)
No members currently viewing this topic.
Forum Moderators: Ben Chase, Trent L. Taylor, Steve L. Taylor

PermissionsExpand / Collapse

All times are GMT -6:00, Time now is 12:09am

Powered By InstantForum.NET v4.1.4 © 2008
Execution: 0.047. 10 queries. Compression Enabled.
Site Map - Home - My Account - Forum - About Us - Contact Us - Try It - Buy It

Microsoft, Visual Studio, and the Visual Studio logo are trademarks or registered trademarks of Microsoft Corporation in the United States and/or other countries.