簡體   English   中英

.net6 無法在 DLL user32.dll 中找到名為“AdjustWindowRectExForDpi”的入口點

[英].net6 unable to find an entry point named 'AdjustWindowRectExForDpi' in DLL user32.dll

例外

WinformApp 窗口

winos:win7 ps1 x64

sdk:.NET SDK 6.0.100-preview.6.21355.2

應用程序:winform 應用程序

ide:vs2022

你好:

winformapp 在 sdk(.NET 6.0.0 Preview 5)上運行良好。

今天我更新了 vs2022 和 .NET 6.0.0 Preview 6。

當我在 Winform 中添加標簽控件並在 win7 中運行 WinformApp 時,它得到了異常。

我能做些什么來解決這個問題?

AdjustWindowRectExForDpi僅在 Windows 10 及更高版本上受支持: https : AdjustWindowRectExForDpi

.NET 6.0 僅在 Windows 10 及更高版本上受支持。 因此,您的選擇是針對 .NET 5.0 構建應用程序或升級到 Windows 10。

在 Forms 中,嘗試將屬性AutoScaleMode更改為與Font不同的值。

在 Windows 8.1 中這是有效的。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM