Go Back   TechArena Community > Software > Software Development
Become a Member!
Forgot your username/password?
Tags Active Topics RSS Search Mark Forums Read

Reply
 
Thread Tools Search this Thread
  #1  
Old 20-07-2009
Member
 
Join Date: Jan 2009
Posts: 163
Reduce file size - reuse icon in C#

Hello friends,
attempted to write a small application in c#, which is almost 130kb, but when I apply the same icon to each form,it increases the file size by the number of forms times the size of the icon to about 500kb.i need to include the icon once and have that one icon reused.how can do it in that way?

Thanks in advance !!
Reply With Quote
  #2  
Old 20-07-2009
Member
 
Join Date: Oct 2005
Posts: 2,389
Re: Reduce file size - reuse icon in C#

FileInfo is useful if your program modifies files, and you want to see how many bytes have been added or removed. i guess you do some thing in the documentation. Do you have the SDK docs installed ?
System.IO.FileInfo fi = new System.IO.FileInfo(filepath);
fi.Length();
Reply With Quote
  #3  
Old 20-07-2009
Member
 
Join Date: May 2008
Posts: 2,293
Re: Reduce file size - reuse icon in C#

My be i you can attach the icons to forms at RUNTIME with statements instead of assigning icons in DESIGN mode of visual studio like this method
this.Icon = "some icon path OR resource file path"
button1.Icon = "same path as above"
toolbar1.Icon = "same path as above"
Reply With Quote
  #4  
Old 20-07-2009
Member
 
Join Date: Apr 2008
Posts: 2,001
Re: Reduce file size - reuse icon in C#

Which compiler options are you using? Are you looking at release or debug builds? Strong named or not? Do the assemblies contain any
resources. you know what data compression reduce the size of .NET executables. Binary file compressors for Windows executables, such as UPX . However, binary compressors do not work with .NET pseudo-executables. The pure .NET solution, we present here can be implemented in any .NET language and does not require any native platform code.There are several benefits of reducing the size of executables. The compressed executable files also consume less hard disk space.
Reply With Quote
Reply

  TechArena Community > Software > Software Development
Tags: ,



Thread Tools Search this Thread
Search this Thread:

Advanced Search


Similar Threads for: "Reduce file size - reuse icon in C#"
Thread Thread Starter Forum Replies Last Post
How can I reduce size of PST file? Betelgeuse Windows Software 6 30-09-2013 11:59 AM
How to reduce the size of icon in Excel 2007 Ribbon Mayuus MS Office Support 4 25-01-2012 04:58 PM
How to reduce size of Icon in Mac OS X Lion Launchpad? fAlCoNeTtI Operating Systems 3 14-10-2011 12:47 PM
Reduce PowerPoint file size in Mac Office 2008 JyotiT Windows Software 6 15-09-2011 10:28 PM
Reduce Size of .wmv file Scott2580 Windows XP Support 3 17-12-2008 08:10 PM


All times are GMT +5.5. The time now is 11:26 AM.