How to embed an application icon into application.exe
using WPF and F#? I did not find it开发者_开发百科 anywhere.
I think the approach is the same for WPF and WinForms, which in F# means manually!
Please see this answer.
You could also looks at FsEye's source for reference (it's done in WinForms), see line 39 of http://code.google.com/p/fseye/source/browse/tags/1.0.0-final/FsEye/FsEye.fsproj, the file http://code.google.com/p/fseye/source/browse/tags/1.0.0-final/FsEye/IconResource.fs, and line 23 of http://code.google.com/p/fseye/source/browse/tags/1.0.0-final/FsEye/Forms/WatchForm.fs
(Update: link is no longer alive -- removed)
Quote:
"Make a .rc file with the following line: 1 ICON "icon.ico"
Then compile it with rc.exe and include the .res file in your project's properties page. You may also include .resources files in your project but the system will not pull the application icon from those."
精彩评论