I know I've done this in the past but can't remember how I did it.
How can I turn off the ControlBox but still have the Close X in the upper
right of a Form?
It's some combo of FixedDialog and ControlBox = false
thanks
mike
Rodger Constandse - 31 Mar 2005 21:19 GMT
If you set the FormBorderStyle to FixedDialog and leave the ControlBox set to
true, the dialog should show the Close X but not the "Control Box".
In the particular Form that I checked I also had the MaximizeBox/MinimizeBox
properties set to false and ShowInTaskbar was also set to false.
I've noticed in the past that for some of my dialogs, sometimes the Control Box
shows in the designer but not when you run the app.
Hope this helps
--
Rodger Constandse
<http://www.SequenceDiagramEditor.com>
Sequence Diagram Editor - A quick and easy way to draw and edit sequence diagrams
> I know I've done this in the past but can't remember how I did it.
> How can I turn off the ControlBox but still have the Close X in the upper
[quoted text clipped - 4 lines]
> thanks
> mike
Michael Howes - 01 Apr 2005 19:51 GMT
> I've noticed in the past that for some of my dialogs, sometimes the
> Control Box shows in the designer but not when you run the app.
this is exactly what was happening. Ugh...I had forgotten..that bug has
been in the designer for a long time
mike
Tim Wilson - 31 Mar 2005 21:32 GMT
If you're just looking to remove the min and max buttons, then you could set
the MaximizeBox and MinimixeBox properties to false.

Signature
Tim Wilson
.Net Compact Framework MVP
> I know I've done this in the past but can't remember how I did it.
> How can I turn off the ControlBox but still have the Close X in the upper
[quoted text clipped - 4 lines]
> thanks
> mike
Herfried K. Wagner [MVP] - 31 Mar 2005 21:34 GMT
"Michael Howes" <mhowes@xfortebio.com> schrieb:
> I know I've done this in the past but can't remember how I did it.
> How can I turn off the ControlBox but still have the Close X in the upper
> right of a Form?
>
> It's some combo of FixedDialog and ControlBox = false
Set 'FormBorderStyle' to 'FixedDialog', 'MaximizeBox' and 'MinimizeBox' to
'False'. At runtime set the form's 'Icon' property to 'Nothing'/'null'.

Signature
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>