How do you make a resizable dialog box in WinForms 2.0?

J

Jeff Johnson

In ye olden days, dialog boxes were of a fixed size. More modern dialogs
allow resizing, but they still look like dialog boxes. As an example, take a
"modern" Open/Save dialog. It can be resized, but it does not display a
control box although it does display a close button.

Windows Forms (2.0) does not seem to provide a means of duplicating this
look. If I set FormBorderStlye to FixedDialog I get just that: a FIXED
dialog. If I set it to Sizable, I can resize it, but I also have a control
box. In VB6, I would have selected the Icon property and hit Delete, which
would have made the control box disappear visually but still function if you
right-click the title bar or hit Alt+Space. VS2005 does not let me do that,
and if I set ControlBox to false then I lose the close button as well. In
other words, I can get close, but I can't figure out how to get exactly what
I'm looking for. Any ideas? To recap, I'll spell out what I want in this
form:

1) Resizable border
2) Control box invisible (no icon, text is flush with the left end of the
title bar. Yes, I could use an empty icon, but then there would be empty
space.)
3) Close button visible
 
J

Jeff Johnson

1) Resizable border
2) Control box invisible (no icon, text is flush with the left end of the
title bar. Yes, I could use an empty icon, but then there would be empty
space.)
3) Close button visible

AAGGGHHH!!! I just stumbled across the ShowIcon property. Problem solved.
 
A

Armin Zingler

Jeff said:
2) Control box invisible (no icon, text is flush with the left end of
the title bar. Yes, I could use an empty icon, but then there would
be empty space.)

ShowIcon = False?


Armin
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top