Python tkinter-加密窗口显示缩放
我的程序具有固定的分辨率主窗口,我不希望它可以解析,但是某些具有很小监视器的PC具有很高的显示器捕获设置,因此该程序无法显示完整的窗口,有没有办法提取此缩放系数我可以加盟吗?还是有一种方法可以编译EXE,以免根据设置进行扩展?
My program has a fixed resolution main window, i dont want it to be resizable, but some PCs with very small monitors will have high display scalling setting, so the program cannot show the full window, is there a way to extract this scaling factor so i can conpensate that? Or is there a way to compile the exe so that it does not scale according to the settings?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您可以使用CTYPE获取缩放系数,然后根据它修改尺寸。
如果比例因子= 150%,则将返回150。
当您在应用程序中使用此号码时,将100除以100。
You can get the scaling factor using ctype and then modify your dimensions according to it.
If scale factor = 150%, this will return 150.
Its probably useful to divide by 100 when your working with this number in your app.
如果我正确理解您,您的问题的答案如下:
当然,您必须乘以
scale
其余的程序大小来缩小程序的规模If I understood you correctly, the answer for your problem is below:
and of course you have to multiply by
scale
the rest of you program sizes to scale down your program