views:

104

answers:

3

How can I create in C# a Windows Form without taskbar (where the minimize and maximize button are placed).

Thanks.

+10  A: 

That's called a Title bar.

Set the FormBorderStyle property to None.

SLaks
+3  A: 

Set Form.ControlBox to false and Form.Text to "". This is not the same as the TaskBar (which is the strip along the bottom (typically) in Windows)

Andrew Flanagan
+1  A: 

To completely remove the title bar you'll need to set the FormBorderStyle to "None" as indicated by SLaks; however, you'll loose all of the other properties of the form's border. If you want anything more customized than that I'd recommend you override the form's OnPaint method but if you don't know what you're doing there your in for a world of hurt.

Brad Heller
Yeah, custom painting in Windows Forms has never ended well for me. My approach these days though is to just write whatever custom-design/painted object I need in WPF since the majority of target machines will have WPF-capable framework installed, or at least the people I target do. If you want to make a borderless window easy on yourself, that's the route I'd recommend. Although, are there any pitfalls of mixing WPF and WinForms in the same app? I've had no problems so far, but I never investigated whether or not there was some hidden gotcha I was missing.
Eric Smith