Close Button But No Icon
-
Hi, I am trying to create a form with the following attributes: 1. A sizable border 2. Close button 3. No icon in the upper left hand corner All of this can be accomplished using the Sizable FormBorderStyle, but the icon remains. Does anyone know how to do this? Sumit Domyan
-
Hi, I am trying to create a form with the following attributes: 1. A sizable border 2. Close button 3. No icon in the upper left hand corner All of this can be accomplished using the Sizable FormBorderStyle, but the icon remains. Does anyone know how to do this? Sumit Domyan
IIRC, since the form is sizable, you can't get rid of the icon using properties. I think your going to have to owner draw the title bar of the form. I DON'T have any example code, nor do I know of any. But, in theory, it's possible to do. Look into overriding WndProc and handling the WM_NCPAINT message. RageInTheMachine9532 "...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
-
Hi, I am trying to create a form with the following attributes: 1. A sizable border 2. Close button 3. No icon in the upper left hand corner All of this can be accomplished using the Sizable FormBorderStyle, but the icon remains. Does anyone know how to do this? Sumit Domyan
If you just don't want to see an icon, the simplest way is to just create a transparent 16x16 icon file and select that for the form's icon. Of course the title will still be offset the same, and the drop down menu will appear if the user clicks in the space. If you want to get rid of all those, you'll have to custom draw the title area. But if you just want a no icon appearance, a transparent icon is far easier. Robert
-
IIRC, since the form is sizable, you can't get rid of the icon using properties. I think your going to have to owner draw the title bar of the form. I DON'T have any example code, nor do I know of any. But, in theory, it's possible to do. Look into overriding WndProc and handling the WM_NCPAINT message. RageInTheMachine9532 "...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
What if form is not resizable? Sumit Domyan
-
What if form is not resizable? Sumit Domyan
The only ones that support no icon in the upper left corner are the ToolWindows and None borders. RageInTheMachine9532 "...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome