Strange Appearance When Using FormBorderStyle=SizableToolWindow

  • Thread starter Thread starter TC
  • Start date Start date
T

TC

I have a form which I'd like to display as a sizable dialog box. The
behavior I get when I use FormBorderStyle = SizableToolWindow is
perfect. However, when I use that option, the title bar of my form
gets much smaller. The discrepancy really stands out, and looks like a
bug.

I anticipate that someone will tell me that the different title bar is
intentional -- that showing a different title bar is Windows' way of
visually distinguishing between normal forms and tool windows. If that
is true, however, then I can find no other example of this alternative
style. I've looked at a dozen dialog boxes -- like the Open File
dialog, the Display Properties dialog, the Folder Properties dialog,
etc. -- and they all look normal. Only my VB.NET form with
FormBorderStyle = SizableToolWindow exhibits an unusual appearance.

My guess is that NET is ignoring my Windows appearance settings when
it generates tool windows, and that's why they look different from
other forms, which follow the settings. If that is true, then this is
a bug.

Has anyone else experienced this problem? More to the point, can
anyone suggest a workaround?

-TC
 
I anticipate that someone will tell me that the different title bar is
intentional -- that showing a different title bar is Windows' way of
visually distinguishing between normal forms and tool windows. If that
is true, however, then I can find no other example of this alternative
style. I've looked at a dozen dialog boxes -- like the Open File
dialog, the Display Properties dialog, the Folder Properties dialog,
etc. -- and they all look normal. Only my VB.NET form with
FormBorderStyle = SizableToolWindow exhibits an unusual appearance.

But they are dialogs, not tool windows.

You have plenty of examples of tool windows in the Visual Studio IDE,
and they all have the smaller title bar.


Mattias
 
I have a form which I'd like to display as a sizable dialog box. The
behavior I get when I use FormBorderStyle = SizableToolWindow is
perfect. However, when I use that option, the title bar of my form
gets much smaller. The discrepancy really stands out, and looks like a
bug.

I anticipate that someone will tell me that the different title bar is
intentional -- that showing a different title bar is Windows' way of
visually distinguishing between normal forms and tool windows. If that
is true, however, then I can find no other example of this alternative
style. I've looked at a dozen dialog boxes -- like the Open File
dialog, the Display Properties dialog, the Folder Properties dialog,
etc. -- and they all look normal. Only my VB.NET form with
FormBorderStyle = SizableToolWindow exhibits an unusual appearance.

My guess is that NET is ignoring my Windows appearance settings when
it generates tool windows, and that's why they look different from
other forms, which follow the settings. If that is true, then this is
a bug.

Has anyone else experienced this problem? More to the point, can
anyone suggest a workaround?

-TC

No bug at all, a "Tool Window" is a window with a much smaller header.
They're not nearly as common in the Windows word as they used to be,
but they look exactly like they're supposed to.

I guess I'm wondering why you don't just use a regular form as they
are sizable as well?

Thanks,

Seth Rowe [MVP]
http://sethrowe.blogspot.com/
 
No bug at all, a "Tool Window" is a window with a much smaller header.
They're not nearly as common in the Windows word as they used to be,
but they look exactly like they're supposed to.

I guess I'm wondering why you don't just use a regular form as they
are sizable as well?

Thanks,

Seth Rowe [MVP]http://sethrowe.blogspot.com/

You guys are right. Tool windows are rare, but I did find a couple of
them: The Find and Replace window and the Pending Checkins window have
the same appearance as my VB.NET form. On that evidence, it appears
that the small title bar is the appropriate behavior.

I now know that SizableToolWindow is inappropriate for my form. I
reverted to a regular form, and I was able to get the exact behavior I
want.

The reason I was using SizableToolWindow in the first place was
because I misunderstood how forms work. When my dialog is active, I
don't want it to appear in the Alt-Tab list. I was having trouble
making it do that. In the Visual Studio documentation, the only
reference I could find to removing a dialog from the Alt-Tab list
involved using SizableToolWindow. Also, I did a web search and found
that other people who had trouble removing forms from the Alt-Tab list
were advised to use SizableToolWindow. That is bad advice. I now know
that my dialog was appearing in the Alt-Tab list because, in my test
program, it had no parent form. I rewrote my test program, and I now
see that SizableToolWindow was never required in the first place.

Thanks for the help.

-TC
 
Back
Top