Results 1 to 4 of 4

Thread: Reduce file size - reuse icon in C#

  1. #1
    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 !!

  2. #2
    Join Date
    Oct 2005
    Posts
    2,393

    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();

  3. #3
    Join Date
    May 2008
    Posts
    2,297

    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"

  4. #4
    Join Date
    Apr 2008
    Posts
    2,005

    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.

Similar Threads

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

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,713,504,172.73582 seconds with 17 queries