
September 22nd, 2003, 02:46 PM
|
 |
Don't fear the penguins!
|
|
Join Date: May 2003
Location: arborlon.gingle.net
Posts: 147
Time spent in forums: 10 sec
Reputation Power: 10
|
|
Form icon doesn't work
I added an icon to my project and set it to "embedded resource". I'm use the following code for my main():
Code:
static void Main()
{
MainForm form = new MainForm();
System.Reflection.Assembly assembly = form.GetType().Assembly;
System.IO.Stream iconStream = assembly.GetManifestResourceStream("Client.Clnt.ico");
System.Drawing.Icon resourceIcon = new Icon(iconStream);
form.Icon = resourceIcon;
Application.Run(form);
}
And it compiles just fine. However, when i run it, the form's icon is that default document one with the grey square in it. Also, the icon doesn't show up when I open the executable in Resource Hacker. Any suggestions? Thanks!
__________________
Every morning, I get up and look through the Forbes list of the richest people in America. If I'm not there, I go to work.
May your Tongue stick to the Roof of your Mouth with the Force of a Thousand Caramels.
To the systems programmer, users and applications serve only to provide a test load.
|