admin管理员组文章数量:1406308
I know that when using Excel VBA, there can be a slight difference in how font sizes are rendered between a Windows and Mac system, due to the different operating system's handling of pixel density and font rendering. This leads to a noticeable difference in the appearance of the same font size on different platforms, even if the numerical value is identical; this is especially relevant when working with user forms or elements with precise sizing requirements.
This means text elements displayed on a Mac no longer fit frames or textboxes etc originally sized for a Windows environment. I can execute the compiler test “#If Mac Then…” to adjust the forms’ text size accordingly - and that's fine. However, Excel userforms running in Windows environment on a Mac inside a virtual machine also display slightly larger text because they're using the Mac's native pixel density and font rendering.
Is there any way using VBA to test whether Windows is running in a VM environment so that I can adjust the font size accordingly? I've searched Google without success perhaps someone here can help?
Normally I would use the compiler tests for Mac or Windows operating systems but I don't want to test for native Windows because I want reduce font sizes only on Mac devices.
本文标签: excelHow to identify if Windows is running on a Mac in a virtual machineStack Overflow
版权声明:本文标题:excel - How to identify if Windows is running on a Mac in a virtual machine - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1745006180a2637277.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论