all groups > dotnet windows forms > january 2007 >
You're in the

dotnet windows forms

group:

Form Icon


Form Icon Craig
1/28/2007 6:07:00 PM
dotnet windows forms:
Hi

If you have a form where the FormBorderStyle=Sizable and no icon is assigned
to the form; you get the WindowsForms 'generic' icon.

Is there a way to remove the 'generic' icon and have no icon displayed?

I tried setting the Icon property to Null in code but this didn't have any
effect.

Re: Form Icon Craig
1/29/2007 2:22:01 AM
Thanks for the reply, I forgot to mention I want to retain the form Close [X]
control box.

Craig

[quoted text, click to view]
Re: Form Icon Craig
1/29/2007 2:39:00 AM
Hi Carlos

You know I thought about doing that but dismissed it as a hack work-around.
I would have thought setting the Icon=null would have done the trick.

Craig

[quoted text, click to view]
Re: Form Icon Otis Mukinfus
1/29/2007 6:22:29 AM
On Sun, 28 Jan 2007 18:07:00 -0800, Craig <Craig@discussions.microsoft.com>
[quoted text, click to view]

Set the ShowIcon property to false.

Good luck with your project,

Otis Mukinfus
http://www.arltex.com
Re: Form Icon Carlos Manuel Perez Fernandez
1/29/2007 9:23:59 AM
Hello Craig,

[quoted text, click to view]

Set the ControlBox property to FALSE.

Regards,
Carlos M Pere


Re: Form Icon Carlos Manuel Perez Fernandez
1/29/2007 10:28:04 AM
Hello Craig,

Have you tried making a completely transparent icon and assigning it to the
Form?

Regards,
Carlos M Perez
http://www.picacodigos.com
mailto:carlosm.perez@gmail.com

C> Thanks for the reply, I forgot to mention I want to retain the form
C> Close [X] control box.
C>
C> Craig
C>
[quoted text, click to view]


Re: Form Icon Carlos Manuel Perez Fernandez
1/29/2007 10:40:13 AM
Hello Craig,

I can't think of any other way. Take into account that that icon represents
the form's ControlBox, so I don't think it has a quick and dirty way of making
it invisible. I'd go for the hack =)


Regards,
Carlos M Perez
http://www.picacodigos.com
mailto:carlosm.perez@gmail.com

C> Hi Carlos
C>
C> You know I thought about doing that but dismissed it as a hack
C> work-around. I would have thought setting the Icon=null would have
C> done the trick.
C>
C> Craig
C>
[quoted text, click to view]


Re: Form Icon Herfried K. Wagner [MVP]
1/29/2007 8:03:19 PM
"Carlos Manuel Perez Fernandez" <carlosm.perez@gmail.com> schrieb:
[quoted text, click to view]

This will cause an indented caption if a caption is specified.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>
AddThis Social Bookmark Button