How do you do a form with no titlebar

  • Thread starter Thread starter Will Pittenger
  • Start date Start date
W

Will Pittenger

It must be top level. I can not write components with this version of C#
(less than Professional). I do want a non-resizing border. I kept looking
for a "ShowTitlebar" property (or something like that), but never found it.
Do I need to write a control? That would not let me have the layout
options. Furthermore, my existing code is written for a form, not a
control. I have no idea what would be needed to convert.
 
Will said:
It must be top level. I can not write components with this version of C#
(less than Professional). I do want a non-resizing border. I kept looking
for a "ShowTitlebar" property (or something like that), but never found it.
Do I need to write a control? That would not let me have the layout
options. Furthermore, my existing code is written for a form, not a
control. I have no idea what would be needed to convert.


Create a Form, set the "ControlBox","MaximizeBox","MinimizeBox" to
false. Set "Text" to empty string. Then, titleBar will disappear.
 
Hi Jacky,
Create a Form, set the "ControlBox","MaximizeBox","MinimizeBox" to
false. Set "Text" to empty string. Then, titleBar will disappear.

Very nice trick!
(MaximizeBox & MinimizeBox don't have to be set to false till
ControlBox is set to false)

I allways changed the Form.FormBorderStyle property to disable titlebar.

Regards

Marcin
 
That works -- but only at design time. The titlebar is still present at
runtime. Besides, since my users will still want to access select commands
while the program is minimized, I need to add stuff to the system menu.
Once you squelch that control box, the system menu is dropped. Is there a
way to respond to right-clicks on the taskbar button?
 
Back
Top