Answered by:
how to create .ico file?

Question
Answers
-
-
ico file for your application or do you mean save an image into an icon?
if it is an icon for your application, simply add an Icon file into your solution (Right click your project in the solution explorer > add > new item > Icon File
then design your icon within the "mini" editor or create your own application icon in some other software and add it into this solution (in the same way as above but select add existing item) and make sure that the icon size is 32x32.
Then you can set the application icon in code:
this.Icon = new Icon("MyIcon.ico");
when the application is starting up, say at Form_load
does this help?
All replies
-
ico file for your application or do you mean save an image into an icon?
if it is an icon for your application, simply add an Icon file into your solution (Right click your project in the solution explorer > add > new item > Icon File
then design your icon within the "mini" editor or create your own application icon in some other software and add it into this solution (in the same way as above but select add existing item) and make sure that the icon size is 32x32.
Then you can set the application icon in code:
this.Icon = new Icon("MyIcon.ico");
when the application is starting up, say at Form_load
does this help?
-
-
-
Thans a lot!
I want to convert a .jpeg/.gif/.btm file to .ico file and use it in my application.
I'll try your method.
Well, may I convert .btm file to .ico in the mini icon editor in visual studio 2005?
Then I can save the icon file to my pc and reuse it when required.
I do want to show it only in some particular examples using the above code at loarding the form.
-
-
-
ahmedilyas,
nice compact and easiy to use Code. Good work. Thank you
One caveat though, the input bmp file shoudl 32x32 pixel and no more than 256 colors. otherwise VS 2008 will reject the resulting ico even though it may look ok in explorer.
I guess that is proabaly some "assumed should have knowledge" but I sure did not know until I used the wimage editor from sybase.
-
Image theImage = Image.FromFile("filename.bmp");
Bitmap theBitmap = new Bitmap(theImage);
theBitmap.Save("newfileName.ico", System.Drawing.Imaging.ImageFormat.Icon);
where I can type these lines to convert a ".jpg" file to ".ico" file or ".cur" file. or which software I can use
-
-
if it is an icon for your application, simply add an Icon file into your solution (Right click your project in the solution explorer > add > new item > Icon File
Greetings,
I'm using VC# 2010 Express. When I right click the project in Solution Explorer, then Add, New Item I don't see a template listed for Icon files. I have 23 choices, each of the Visual C# type. Perhaps this is some 'selectable' functionality that I neglected to enable when installing VC#E, or is it a limitation of Express versus Pro?
When I add an .ico as an "existing file" everything seems fine though a right click to open the ico results in launching MS Paint rather than the mini icon editor mentioned in the answer by ahmedilyas.
Thanks for your help in advance.
-
hello ahmedilyas,how do you do. I have a simple question too. Could you help me? I am
reading a book,Programming Windows by Charles Petzold.It is the 5th edition,and Petzold is a
good author . The author introduces Windows programming using VC++2008. But I have
install VC++2010. In Chapter 10, the author prescribed how to create our own Icon. I dont
know how to create my own icon using VC++2010. you may know ,VC++2010 is different from
VC++2008.I dont know how to create a .RC file,though I know how to create .h and .IOC files.
And I dont knowwhere the Icon'sID is. Could you like to help me?
By the way,would you like to tell me how to be an excellent programmer as you? here is my
email address: zhouweisen1986@gmail.com i really need your help.
-
Ohh, its a simple problem you can download the IcoFX software for windows 7 from the following link,
icofx.ro/downloads.html
and you also can download the full version using,
http://thepiratebay.se/torrent/6965479/IcoFX.Software.IcoFX.v2.1.Incl.Keygen-Lz0
Ico FX is the greatest software created to make Icons and convert images to ICO format
-
-
the visual studio, version 6.0 allowed editing and saving ico files. If you install another version even a trial version, then that disables the ability to edit ico files. (Microsoft gives you a free trial of new software, which disables old features that you've already paid for, good job mr softie.).