我有一个放置图像的Winform。设计在Win 7上,DPI为100%。 当将DPI更改为125%或更高后显示相同的Winform时,我发现图像已移位Winform。 Winform可能因DPI更改而自动缩放,但Image(嵌入在Resx文件中)不会缩放。 目前,winform的AutoScaleMode设置为Font,AutoSizeMode设置为GrowOnly。我尝试在没有水果的情况下切换这些设置。 因此,如何在更高DPI设置的Winform上正确获取图像?或者如何让这个Winform不受DPI变化的影响? 请指教。 非常感谢任何帮助。
Hi, I have a Winform on which a image is placed. Designed on Win 7 with DPI at 100%. When the same Winform is displayed after changing the DPI to 125% or higher, I observe that the Image is displaced on the Winform. The Winform was possibly Auto scaled due to DPI changes but the Image (which is embedded in the Resx file) wont get scaled. Currently, The winform's AutoScaleMode is set to "Font" and the "AutoSizeMode" is set to "GrowOnly". I tried toggling these setting with no fruits. Thus, How would I get the Image properly on my Winform in Higher DPI settings? OR How can I make this Winform remain unaffected from DPI changes ? Please advise. Any help is greatly appreciated.
推荐答案更改表单的 AutoScaleMode 到 Dpi 。 / ravi Change your Form's AutoScaleMode to Dpi. /ravi
更多推荐
如何使Winform不受Windows DPI设置更改的影响?
发布评论