Removing Icon from a Form
-
I have a form with
FormBorderStyle
set toSizable
, and no minimize or maximize buttons, and noShowInTaskbar
. It displays the default Windows Forms icon in the title bar, even if I set theIcon
property tonull
in the constructor. Is there a way to have a sizable dialog without that little icon in the caption? How? Thanks! -- LuisR
Luis Alonso Ramos Intelectix - Chihuahua, Mexico Not much here: My CP Blog!
-
I have a form with
FormBorderStyle
set toSizable
, and no minimize or maximize buttons, and noShowInTaskbar
. It displays the default Windows Forms icon in the title bar, even if I set theIcon
property tonull
in the constructor. Is there a way to have a sizable dialog without that little icon in the caption? How? Thanks! -- LuisR
Luis Alonso Ramos Intelectix - Chihuahua, Mexico Not much here: My CP Blog!
The only way to do it is to set the icon to an image that matches the color o the title bar. You can't not have an icon there. RageInTheMachine9532 "...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
-
The only way to do it is to set the icon to an image that matches the color o the title bar. You can't not have an icon there. RageInTheMachine9532 "...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
There are two other ways: 1st way: It's most like the idea of Dave. Use a icon where all pixel are transparent. 2nd way: Set the borderstyle to sizeable Toolwindow. The caption bar is a bit smaller.
-
The only way to do it is to set the icon to an image that matches the color o the title bar. You can't not have an icon there. RageInTheMachine9532 "...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
Yes, I had thought about an all-transparent icon, but it still leaves the text a little more to the right than usual. I've seen resizable windows without an icon, but I don't know if they're .NET apps or not. For example the common Open dialog in Visual Studio (that's not .NET, but I remember seeing another window in Visual Studio which I cannot find). -- LuisR
Luis Alonso Ramos Intelectix - Chihuahua, Mexico Not much here: My CP Blog!
-
There are two other ways: 1st way: It's most like the idea of Dave. Use a icon where all pixel are transparent. 2nd way: Set the borderstyle to sizeable Toolwindow. The caption bar is a bit smaller.
Lars Niedziolka wrote: Set the borderstyle to sizeable Toolwindow. The caption bar is a bit smaller. Yes, I know, but that's not what I'm looking for... thanks! -- LuisR
Luis Alonso Ramos Intelectix - Chihuahua, Mexico Not much here: My CP Blog!
-
Yes, I had thought about an all-transparent icon, but it still leaves the text a little more to the right than usual. I've seen resizable windows without an icon, but I don't know if they're .NET apps or not. For example the common Open dialog in Visual Studio (that's not .NET, but I remember seeing another window in Visual Studio which I cannot find). -- LuisR
Luis Alonso Ramos Intelectix - Chihuahua, Mexico Not much here: My CP Blog!
Hi Luis, the solution is very simple. Set the property ControlBox of the form to false. -- Niedzi
-
Hi Luis, the solution is very simple. Set the property ControlBox of the form to false. -- Niedzi
Thanks, but I tried that too and it also hides the close button on the right of the caption bar. Maybe it's not possible with the framework. Thanks anyway. -- LuisR
Luis Alonso Ramos Intelectix - Chihuahua, Mexico Not much here: My CP Blog!