On Windows 10 一些 FormBorderStyles 没有边框

On Windows 10 Some FormBorderStyles has no borders

只有在外观设置中关闭阴影时才会出现此问题。

我注意到我们的一些申请表 windows 没有边框。具体来说,他们缺少表单左侧部分、右侧部分和底部部分的 1 像素粗边框 window。所有窗体的共同点是它们都使用 FormBorderStyle FixedToolWindow 或 SizableToolWindow。当它像这样时,很难区分一个对话从哪里停止,另一个对话从哪里开始。

我们发现我们的一些用户可能会像这样设置他们的计算机而无法更改它。

有没有办法让对话框 windows 看起来更好,而不用像手动绘制所有边框那样做任何疯狂的事情?

引用 Hans Passant 的部分评论:

By design for Win10, the left/bottom/right borders are transparent. Still quite visible against the large drop-shadow, so visible that is hard to tell that the border is transparent...

我们的应用程序有自己的图形风格,这使得区分一个对话框停止和另一个对话框开始的位置变得特别困难。

我们的快速解决方案是停止使用 FormBorderStyle FixedToolWindow 或 SizableToolWindow。

从长远来看,我们将通过我们所有的对话框和应用程序的图形样式,使对话框更容易区分,无论是否有边框。