Questions about form icons in WinForms apps

  • Thread starter Thread starter Luis Arvayo
  • Start date Start date
L

Luis Arvayo

Hi,

- Is there a way to that every form in my app use the same icon withouth
adding it to the Icon property one form by one ?

- Do I must add to my app the icon(s) I will use in my forms as embedded
resource, then I must use the assembly.GetManifestResourceStream in order to
assign to my forms ? Is that the correct way ?

- Can I use 24 bit icons ?



Regards
Luis Arvayo
 
Luis,

You should be able to use 24 bit icons if you are using Windows XP (I
believe it is an OS-dependent feature).

As for an easy way to solve this, create a class that derives from Form,
and set the icon in the constructor.

Then, have all of your classes derive from that new Form type that you
have defined, and it should work fine.

Hope this helps.
 
Hello Luis,

I found the idea to have icons for all forms not very good, cuz there are
dialogs that don't have icons at all (modals one).

LA> - Is there a way to that every form in my app use the same icon
LA> withouth adding it to the Icon property one form by one ?
LA>
LA> - Do I must add to my app the icon(s) I will use in my forms as
LA> embedded resource, then I must use the
LA> assembly.GetManifestResourceStream in order to assign to my forms ?
LA> Is that the correct way ?
LA>
LA> - Can I use 24 bit icons ?
LA>
LA> Regards
LA> Luis Arvayo
---
WBR,
Michael Nemtsev :: blog: http://spaces.msn.com/laflour

"At times one remains faithful to a cause only because its opponents do not
cease to be insipid." (c) Friedrich Nietzsche
 
Thank you. That gave me a good hint to what to do.

Nicholas Paldino said:
Luis,

You should be able to use 24 bit icons if you are using Windows XP (I
believe it is an OS-dependent feature).

As for an easy way to solve this, create a class that derives from
Form, and set the icon in the constructor.

Then, have all of your classes derive from that new Form type that you
have defined, and it should work fine.

Hope this helps.


--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)

Luis Arvayo said:
Hi,

- Is there a way to that every form in my app use the same icon withouth
adding it to the Icon property one form by one ?

- Do I must add to my app the icon(s) I will use in my forms as embedded
resource, then I must use the assembly.GetManifestResourceStream in order
to assign to my forms ? Is that the correct way ?

- Can I use 24 bit icons ?



Regards
Luis Arvayo
 
Hello Luis,

modal dialog boxed are not showed there, and *generally* have no icons.
But it's up to u whether create icons for all windows or not. I've seen a
lot of samples where dialog boxes were with icons

LA> But the icon of that form will be seen anyway in the windows main
LA> toolbar
LA>
LA> "Michael Nemtsev" <[email protected]> escribió en el mensaje
LA> LA>---
WBR,
Michael Nemtsev :: blog: http://spaces.msn.com/laflour

"At times one remains faithful to a cause only because its opponents do not
cease to be insipid." (c) Friedrich Nietzsche
 
Back
Top