如何将 Windows 窗体窗体调整为小于 132x38? [英] How to resize a Windows Forms form to be smaller than 132x38?

查看:22
本文介绍了如何将 Windows 窗体窗体调整为小于 132x38?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我将无边框表单调整为较小的宽度和高度时,它不会小于 {Width=132, Height=38}.

When I resize a borderless form to a small width and height, it won't get smaller than {Width=132, Height=38}.

如何让它变小?

推荐答案

更新的答案

根据评论部分的讨论,您尝试执行的操作在 Windows 中可能是不允许的.我可以制作的最小窗口是仅显示图标和控件框的位置.要使其更小,您必须最小化窗口,这实际上会使其不可见(尽管仍然存在于任务栏上).

Based on the discussion in the comments section, what you're trying to do may not be permissible in Windows. The smallest I can make a window is to where just the icon and the controls box is showed. To make it any smaller you would have to minimize the window, which would essentially make it invisible (though still present on the task bar).

老实说,我不确定将窗口做得小到您仍然可以看到它但无法访问应用程序图标或控制框会获得什么价值.

I'm not sure what value would be gained by making a window so small that you could still see it but couldn't access the app icon or the control boxes, to be honest.

结束更新的答案

检查表单上的 MaximumSize 和 MinimumSize 属性.它们目前可能设置为 123、38.

Check the MaximumSize and MinimumSize properties on the Form. They are probably set to 123, 38 currently.

您可以在属性窗格的设计器中设置它们,也可以通过编程方式设置它们:

You can set them in the designer in the properties pane, or you can set them programatically:

Form1.MaximumSize = new Size(1000, 1000);
From1.MinimumSize = new Size(0, 0);

这篇关于如何将 Windows 窗体窗体调整为小于 132x38?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆