简体   繁体   English

在构建代理上构建应用程序时,为什么 VB6 应用程序会切断表单底部的控件?

[英]Why would a VB6 app cut off controls from the bottom of the form when building the app on a build agent?

We have an old VB6 application that is occasionally updated, and we noticed recently that we intermittently have problems with controls being cut off from the bottom of the form (eg OK / Cancel buttons only show the top).我们有一个旧的 VB6 应用程序,它偶尔会更新,我们最近注意到我们间歇性地遇到控件从表单底部被切断的问题(例如,确定/取消按钮只显示顶部)。

显示按钮顶部的图像

When the dev team compile the application on their desktops and run it, the form looks fine.当开发团队在他们的桌面上编译应用程序并运行它时,表单看起来很好。 However, when we build the application on our build agent (kicked off via Jenkins), we are finding that the controls on the bottom of the form are cut off.但是,当我们在构建代理上构建应用程序时(通过 Jenkins 启动),我们发现表单底部的控件被切断了。

We had a Prod build in May, and the screen was fine.我们在 5 月份进行了 Prod 构建,屏幕很好。 Since then, we've had another update which needed to be deployed to Prod, however this time the controls are cut off.从那时起,我们有另一个需要部署到 Prod 的更新,但是这次控制被切断了。 My colleague seems to think that the way to resolve this issue is kick off the build via Jenkins, open a Remote Desktop session on the build agent while the build is running, with the screen maximised.我的同事似乎认为解决此问题的方法是通过 Jenkins 开始构建,在构建运行时在构建代理上打开远程桌面 session,并最大化屏幕。

Why would this be a fix?为什么这是一个修复? Is there a way around this?有没有解决的办法? Ideally we'd like to be able to kick off a build via Jenkins and have the process complete automatically, and not require a manual step of opening a remote connection each time.理想情况下,我们希望能够通过 Jenkins 启动构建并自动完成该过程,而无需每次都手动打开远程连接。

Any advice would be appreciated:) Thanks.任何建议将不胜感激:) 谢谢。

Disclaimer: I'm no expert on that matter, but I've pieced that much together in the past:免责声明:我不是这方面的专家,但我过去拼凑了这么多:

It has to do with the ScaleMode property of the form, which defaults to Twips .它与表单的ScaleMode属性有关,默认为Twips MSDN states that MSDN 指出

twip A screen-independent, absolute unit of measurement (such as an inch or a centimeter). twip独立于屏幕的绝对测量单位(例如英寸或厘米)。 A twip is a unit of length equal to 1/20 of a printer's point, and a printer's point is 1/72 of an inch.缇是长度单位,等于打印机磅的 1/20,而打印机磅是 1/72 英寸。 There are approximately 1440 twips to a logical inch or 567 twips to a logical centimeter (the length of a screen item measuring one inch or one centimeter when printed).逻辑英寸大约有 1440 缇或逻辑厘米有 567 缇(打印时屏幕项目的长度为一英寸或一厘米)。

Looking atthis posting , it also seem to depend on the screen resolution.这个帖子,它似乎也取决于屏幕分辨率。

So I'd make sure the dev/build machines share the same settings.所以我会确保开发/构建机器共享相同的设置。

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

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