wired ico

B

Brian

Some small things about ico make me very confused.



I want give my winform app a new icon. I designed it but visual studio
insisted to use the default one. Isn't the icon's format 32 x 32?



2nd, I try to display a small icon for my app at taskbar like the following
codes:

System.Windows.Forms.NotifyIcon notifyIcon1 = new
System.Windows.Forms.NotifyIcon();

notifyIcon1.Icon = new System.Drawing.Icon("app.ico");

Now I don't want to distribute my exe file with app.ico. How can I integrate
it in my app.exe? In other words, I just use my app.exe file only instead of
two files together.



Thanks.
 
S

Sushant Bhatia

You can use a resource file to hold the image and then at runtime, get
the image from the resource file and make it your icon.
Sushant
 
B

Brian

Can you give me a example?
I know how to use resource in Visual Studio (VB, VC), but I don't know how
to use resource files in codes.
I have already created a resource icon file.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top