简体   繁体   English

调整窗体大小和控件 VB 6.0

[英]Resize form and controls VB 6.0

Good morning, the problem is that I am making an application where I have several forms with many objects.早上好,问题是我正在制作一个应用程序,其中有几个 forms 和许多对象。 I work with a resolution of 1024 * 768, but when I change to a higher screen resolution, the controls are grouped on the left side of the screen.我使用 1024 * 768 的分辨率,但是当我更改为更高的屏幕分辨率时,控件会在屏幕左侧分组。 How can I control the size of the application's forms and controls so that they adapt when the screen resolution is changed from Windows?如何控制应用程序的 forms 和控件的大小,以便它们在屏幕分辨率从 Windows 更改时适应?

Thank you in advance for your help预先感谢您的帮助

With VB6 there is no simple solution, unlike.Net.与.Net不同,使用 VB6 没有简单的解决方案。

You need to look at the Form_Resize event and in there resize/reposition controls as necessary.您需要查看 Form_Resize 事件,并根据需要在其中调整大小/重新定位控件。 There is no automatic way, you pretty much have to work it all out manually.没有自动的方法,您几乎必须手动完成所有工作。

If however this is a new development and you've just started, I'd recommend moving over to VB.Net as it has a host of features that make handling form resizing really easy to deal with.但是,如果这是一个新的开发项目并且您刚刚开始,我建议您转到 VB.Net,因为它具有许多功能,使得处理表单大小调整非常容易处理。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM