.Net Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsProgramming Languages - More.Net Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old September 22nd, 2003, 02:46 PM
Jair's Avatar
Jair Jair is offline
Don't fear the penguins!
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2003
Location: arborlon.gingle.net
Posts: 147 Jair User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 10 sec
Reputation Power: 10
Send a message via MSN to Jair Send a message via Yahoo to Jair
Angry 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.

Reply With Quote
  #2  
Old September 22nd, 2003, 04:40 PM
Jair's Avatar
Jair Jair is offline
Don't fear the penguins!
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2003
Location: arborlon.gingle.net
Posts: 147 Jair User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 10 sec
Reputation Power: 10
Send a message via MSN to Jair Send a message via Yahoo to Jair
Oh, and I'm writing this with C# in Visual Studio .NET 2002. Sorry about forgetting that

Reply With Quote
  #3  
Old October 7th, 2003, 07:15 PM
lukehashj lukehashj is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2003
Posts: 3 lukehashj User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via AIM to lukehashj
you might want to try putting two .'s instead of just the one. (i'm not 100% sure if strings can handle .'s without a / in front of em or whatever, either)

other than that, i see nothing wrong with your code.

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - More.Net Development > Form icon doesn't work

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap