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.
发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745006181a4605796.html
评论列表(0条)