简体   繁体   中英

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).

显示按钮顶部的图像

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.

We had a Prod build in May, and the screen was fine. Since then, we've had another update which needed to be deployed to Prod, however this time the controls are cut off. 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.

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.

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 . MSDN states that

twip A screen-independent, absolute unit of measurement (such as an inch or a centimeter). 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. 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).

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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