- using System.Reflection;
- using System.IO;
- private static Image DefaultIcon()
- {
- Assembly thisExe = Assembly.GetExecutingAssembly();
- Stream fs = thisExe.GetManifestResourceStream("MyApp.App.ico");
- return Image.FromStream(fs);
- }
- //该片段来自于http://www.codesnippet.cn/detail/15112012386.html
来源: http://www.codesnippet.cn/detail/15112012386.html