C#表格缩小-紧急! [英] C# Form Shrinking - Urgent!

查看:87
本文介绍了C#表格缩小-紧急!的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我在这里需要一些认真的帮助,由于这种极其奇怪的行为,我的项目处于完全停滞状态.

最容易显示在图像中,所以在这里是:


左边的窗口在调试时,右边的窗体在设计器中.

如您所见,大小ISN''T相同,并且我无法继续,因为控件的锚定方式使控件消失了.

AutoSize形式的属性设置为false.
我的代码中没有地方可以动态更改任何内容的大小.

我曾尝试对此进行研究,但这似乎是一个非常独特的现象!

谢谢大家!

Hello all,

I am in need of some serious help here, my project is at a complete stand-still due to this extremely strange behavior.

It is easiest to display in an image, so here it is:


The window on the left is while debugging, and the form on the right is in the designer.

As you can see, the size ISN''T the same, and I cannot continue because my controls are disappearing due to the way they are anchored.

The form AutoSize property is set to false.
There is no where in my code where I dynamically change the size of anything.

I tried researching this but it seems to be quite a unique occurrence!

Thanks a lot guys!

推荐答案


检查Windows窗体布局属性
大小和GrowAndShrink属性一起增加高度和宽度
Hi
Check the Windows Form Layout properties
Size increase height and width along with GrowAndShrink Property


HI
转到From属性-> " AutoSizeMode "属性将其更改为 GrowAndShrink ,然后检查
HI
Go to the From properties --> "AutoSizeMode" property change it to GrowAndShrink then check


谢谢,但是它没有任何改变:((.


如果使用属性窗口设置大小,它将更改为正确的大小.

然后,当我运行它时,它将显示为正确的大小.

但是,在重建之后,设计器中表单的高度恰好减少了21个像素.

真奇怪!




我发现它不断添加到设计器文件中!

而不是更改Size属性,而是更改了名为ClientSize的内容!

此属性中的值与我在属性对话框中设置的值不匹配.
Thanks, but it didn''t change anything :(( .


If I set the size using the properties window, it will change to the correct size.

Then when I run it, it will display as the correct size.

But right after it rebuilds, the height of the form in the designer decrements by exactly 21 pixels.

It is so strange!




I found something that it keeps adding to the designer file!

Instead of changing the Size property, it is changing something called ClientSize!

The values in this property do not match the ones I have set in the properties dialog.


这篇关于C#表格缩小-紧急!的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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