Forms应用程序的应用程序

Forms应用程序的应用程序

本文介绍了HOWTO设置典型C#/ Win-Forms应用程序的应用程序。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

请帮忙,


我有一个典型的Win-Form应用程序,我在"调整大小"中发出这个简单的命令。句柄:


this.Width = 156;


但是,尽管成功运行,但是窗口大小达到了142像素。 />
同样,我尝试使用宽度:


this.Width = 586;


宽度达到572像素在宽度。这意味着,尽管"this.Width",使用时,它可以随意调整应用程序的窗口大小,例如应用程序窗口内的客户端宽度,和/或每次减去14
像素。


确实,它是前者。我会说,我需要根据需要设置宽度(以像素为单位),如果有任何形状边框,或者C#/ .NET中某些深度隐藏的Wind-Form gui覆盖了我对"thi.Width"的调用。 ,然后解决方案将需要
停用极端偏见。



解决方案

Please help,

I have a typical Win-Form app, and I issue this simple command in the "Resize" handle:

this.Width = 156;

But, despite this getting ran, successfully, the windows size comes out to 142 pixels.
Likewise, I tried this with width:

this.Width = 586;

And the width comes out to 572 pixels in width. This means, despite "this.Width" being used, it is either arbitrarily NOT sizing the application's window, like maybe the client width inside the application's window, and/or it is subtracting 14 pixels off every time.

Assuredly, it is the former. I will say, that I need to set the width in pixels as I need it, and if anything like form-border, or some deeply hidden Wind-Form gui in C#/.NET is overriding my call to "thi.Width", then the solution will need to deactivate that with extreme prejudice.

解决方案


这篇关于HOWTO设置典型C#/ Win-Forms应用程序的应用程序。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-06 00:17