Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Changing F# application icon

Tags:

icons

f#

I'm developing Windows Application using Visual Studio 2013 and F# but I can't change default application icon.

I have tried to create a C#-WPF application for font-end, it work. But I don't want to use C# for font-end.

I also tried resource hacker after building my application, but it is just not working.

like image 584
Umut Karakoç Avatar asked Nov 10 '14 10:11

Umut Karakoç


People also ask

How do you change F-1 to f2?

There are two ways to do this: Travel outside the U.S., preferably to your home country, apply at the U.S. consulate or embassy with your new I-20/visa type, and re-enter on that. Request a change in status while in the U.S. There is an application process that can take up to three months.

What does changing the aperture do?

Changing the f-number changes the size of the aperture, changing the amount of light that passes through the lens. The higher the f-number, the smaller the aperture and the less light that passes through the lens; the lower the f-number, the larger the aperture and the more light that passes through the lens.

What is aperture f?

All things aperture. The “f” in f-stop stands for the focal length of the lens. While focal length itself refers to the field of view of a lens, f-stop is about how much light you allow to hit the sensor via the aperture opening.

Can you go from F-1 to J-1?

If you are a graduate on F1 OPT visa looking to become a J1 intern: You must leave the U.S. and pursue a post-secondary education degree. Then, you can apply for a J1 Intern Visa within 12 months of finishing your studies at that institution.


1 Answers

The application icon is the image that appears in Windows Explorer when viewing the EXE file. To set the application icon of an F# Windows Application:

  1. Create a text file with an *.rc extension.

  2. Add one line to the *.rc file (substituting the name of your icon file, of course): 1 ICON "icon.ico".

  3. Compile the *.rc file with rc.exe into an *.res file.

  4. In Visual Studio, in the property page for your *.exe project, set the *.res file as your project's "Resource file."

While we are on the topic, the icon that appears in the Windows task bar comes from the main window icon. It can be set like this:

  1. Include the icon in the project as a Resource (not an EmbeddedResource).
  2. In your main window XAML, reference the icon using the assembly path.

Sample:

<Window xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Icon="/MyAssemblyName;component/MyPathToIcons/Logo.ico">
like image 121
Wallace Kelly Avatar answered Oct 09 '22 02:10

Wallace Kelly