sjn78 Posted August 27, 2003 Posted August 27, 2003 I started my program with the intention of not using any graphics, ie icons in toolbars. But now I have decided to use them. They are all stored in imagelists, except the icons for the forms. The program is no where near complete and it jumped from around 100k to now 600k since using icons. At this rate, I believe it will probably end up around 10mb. I was just wondering what you guys think or recommend to do. Would it be better to contain all of the icons in a dll, therefore reducing the exe size. Would this make the program run any quicker?? I guess the load time would be shorter. Or is there a way to have your icons in a folder and directly call them to be used in a toolbar? Thanks for any assistance. Quote
*Gurus* divil Posted August 27, 2003 *Gurus* Posted August 27, 2003 One alternative is to put certain forms in different assemblies, or even to enable localization so satellite assemblies are created. However I don't believe this will gain you any speed, so unless the resources are shared I don't really see the point. Personally I use GIFs for toolbar images, I believe this might save some space. You could just have the images in a folder and load them in to the imagelist at runtime, if the EXE file size is important to you. 10mb does sound excessive, I have an application with a lot of toolbar images embedded and it doesn't come anywhere near even half a meg. Quote MVP, Visual Developer - .NET Now you see why evil will always triumph - because good is dumb. My free .NET Windows Forms Controls and Articles
sjn78 Posted August 27, 2003 Author Posted August 27, 2003 Thanks, I will try converting the icons to Gif's first of all and see how it compares. Quote
sjn78 Posted August 27, 2003 Author Posted August 27, 2003 It worked...sort of. The exe was about 780, and now it is 580 after converting to GIF's. Quote
*Experts* Nerseus Posted August 27, 2003 *Experts* Posted August 27, 2003 We put all of our core graphics into a separate assembly (project/DLL) which exposes them as resources. You get them by a string name, which is generally the original filename minus extension but wouldn't have to be. They're called like GetBitmap("mainlogobig") and GetIcon("exclamation3"). That way you an add more later without breaking any interfaces or version numbers but you can separate out the graphics. Just another idea. -Ner Quote "I want to stand as close to the edge as I can without going over. Out on the edge you see all the kinds of things you can't see from the center." - Kurt Vonnegut
Diablicolic Posted August 28, 2003 Posted August 28, 2003 I like DLLs :) I'm going to try that real quick, brb... aahh! Ok I created an Assembly Resource File, it's Embedded...am I going the right way for a DLL? And plus I don't understand this: Quote "Reality is fake, Dreams are for real"
*Experts* Nerseus Posted August 28, 2003 *Experts* Posted August 28, 2003 Check out Bucky's response in this thread. Once you know how to load a bitmap from your EXE, you can expose a static method in a class in your DLL that let's you pull out the filename dynamically. If you need help with that, let me know. -Ner Quote "I want to stand as close to the edge as I can without going over. Out on the edge you see all the kinds of things you can't see from the center." - Kurt Vonnegut
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.