调整窗口大小和重新定位窗体控件 [英] Resizing and repositioning windows form controls
本文介绍了调整窗口大小和重新定位窗体控件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
您好
我正在使用C#.NET开发一个应用程序。与所有标准应用程序一样,最终用户可以重新调整应用程序中的表单。我需要根据表单大小的变化重新调整表单上的图片框,文本框和标签等控件。我已经尝试过锚和码头属性,但无法让它们按照我想要的方式工作。任何帮助请..
Hello
I am developing an application in C# .NET. The forms in the application are re-sizable by the end user, like all standard applications. I need the controls like pictureboxes, textboxes and labels on the forms to be re-sized and repositioned according to the change in forms size. I've tried anchor and dock properties but couldn't get them work exactly how I wanted to. Any help please..
推荐答案
您是否尝试将Control的Dock属性设置为:
Have you tried setting the Dock property of the Control to Fill as:
YourControl.Dock = DockStyle.Fill;
使用此控件将自动填充到整个表格的大小
using this your control will auto fill to the size of whole form
这篇关于调整窗口大小和重新定位窗体控件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文