Removing the Titlebar from Windows Form

  • Thread starter Thread starter blesh
  • Start date Start date
B

blesh

Is it possible to remove the Titlebar from a Windows Form?

I know I can create a custom region to essentially "hide" the title
bar... but the only problem with that is the fact the the Width /
Height settings of the form aren't the actual width and height, and the
location defined in the properties of the form aren't the actual
location. (i.e. if I use a region that removes the titlebar, and I set
the form's location to (0,0), it will sit lower than 0,0).

Furthermore, it'd be nice if I could make a form that appeared
different actually appear different in design mode.

It seems all of these things are possible. Any clues?
 
Setting FormBorderStyle = None will remove the title bar (at both design and
run time)

Alternatively if you need a border you can set ControlBox = false and Text =
""
which will have the same effect
 
blesh said:
Is it possible to remove the Titlebar from a Windows Form?

I know I can create a custom region to essentially "hide" the title
bar... but the only problem with that is the fact the the Width /
Height settings of the form aren't the actual width and height, and the
location defined in the properties of the form aren't the actual
location. (i.e. if I use a region that removes the titlebar, and I set
the form's location to (0,0), it will sit lower than 0,0).

Furthermore, it'd be nice if I could make a form that appeared
different actually appear different in design mode.

It seems all of these things are possible. Any clues?

Remove the control box and the Text (Caption) and it will appear with no
title bar.
 
Back
Top