<bdo id="2fwpw"></bdo><noframes id="2fwpw"><delect id="2fwpw"></delect><delect id="2fwpw"></delect><noframes id="2fwpw"><rt id="2fwpw"></rt><bdo id="2fwpw"></bdo><delect id="2fwpw"></delect><delect id="2fwpw"><bdo id="2fwpw"></bdo></delect><noframes id="2fwpw"><noframes id="2fwpw"><delect id="2fwpw"><delect id="2fwpw"></delect></delect><rt id="2fwpw"></rt><delect id="2fwpw"></delect><delect id="2fwpw"></delect><bdo id="2fwpw"></bdo><bdo id="2fwpw"></bdo> <bdo id="2fwpw"><rt id="2fwpw"></rt></bdo><noframes id="2fwpw"><bdo id="2fwpw"></bdo><bdo id="2fwpw"></bdo><delect id="2fwpw"><rt id="2fwpw"></rt></delect><rt id="2fwpw"><rt id="2fwpw"></rt></rt><bdo id="2fwpw"><bdo id="2fwpw"></bdo></bdo><rt id="2fwpw"></rt><delect id="2fwpw"></delect><noframes id="2fwpw"><rt id="2fwpw"></rt><rt id="2fwpw"></rt><rt id="2fwpw"></rt><rt id="2fwpw"></rt><delect id="2fwpw"><noframes id="2fwpw"><noframes id="2fwpw"> <delect id="2fwpw"></delect><delect id="2fwpw"></delect><noframes id="2fwpw"><delect id="2fwpw"></delect><bdo id="2fwpw"></bdo><noframes id="2fwpw"><noframes id="2fwpw">
工控軟件開(kāi)發(fā)
級別: 正式會(huì )員
精華主題: 0
發(fā)帖數量: 42 個(gè)
工控威望: 89 點(diǎn)
下載積分: 504 分
在線(xiàn)時(shí)間: 4(小時(shí))
注冊時(shí)間: 2023-04-06
最后登錄: 2024-06-04
查看工控軟件開(kāi)發(fā)的 主題 / 回貼
樓主  發(fā)表于: 2024-06-04 22:46

C# Winform 在低DPI創(chuàng )建窗體后,在高DPI運行時(shí),窗體會(huì )自動(dòng)拉伸,導致窗體顯示不全,

比如在分辨率為100% 的電腦創(chuàng )建C#項目,當運動(dòng)到分辨率為125%的電腦運行時(shí),后者運行的窗體會(huì )自動(dòng)拉伸,窗體顯示超出頁(yè)面等問(wèn)題。

選中項目,右鍵點(diǎn)屬性》查看WINDOWS設置,修改app.manifest,啟用下列功能(前面的'去掉)       
修改文件:app.manifest       

    <Application xmlns = "urn:schemas-microsoft-com:asm.v3" >
    <windowsSettings>
        <dpiAware xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">true</dpiAware>
    </windowsSettings>
    </application>

-----------------

第2種方法:

經(jīng)過(guò)多次嘗試,解決該問(wèn)題比較方便的一個(gè)方式是,在項目中添加 應用程序清單文件即可。

具體步驟如下:

1、啟動(dòng)項目找到 添加 》添加新建項(選應用程序清單文件):

2、添加后在項目中找到添加的文件APP.manifest雙擊打開(kāi),

3、找到app2.manifest里面的內容,添加如下的內容:

    <Application xmlns = "urn:schemas-microsoft-com:asm.v3" >
    <windowsSettings>
        <dpiAware xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">true</dpiAware>
    </windowsSettings>
    </application>

4、保存,然后重新生成解決方案。解決自動(dòng)拉伸問(wèn)題。

我的博客,你可以先看一下我的文章和以前幫別人解決的一些技術(shù)問(wèn)題。
專(zhuān)注VB編程開(kāi)發(fā)20年的博客_CSDN博客-作品成品 開(kāi)發(fā)的一些軟件,股票分析理財投資,自動(dòng)編程 源碼庫領(lǐng)域博主

https://blog.csdn.net/xiaoyao961
雪山飛狐
級別: 網(wǎng)絡(luò )英雄
精華主題: 0
發(fā)帖數量: 13081 個(gè)
工控威望: 15835 點(diǎn)
下載積分: 46326 分
在線(xiàn)時(shí)間: 1028(小時(shí))
注冊時(shí)間: 2019-06-05
最后登錄: 2025-06-09
查看雪山飛狐的 主題 / 回貼
1樓  發(fā)表于: 2024-06-05 07:30
研究研究一下。

国产精品碰碰现在自|超碰香蕉人人网99精品|人妻无码一区二区19p|久久久噜噜噜久久中文字幕|亚洲va中文字幕无码
<bdo id="2fwpw"></bdo><noframes id="2fwpw"><delect id="2fwpw"></delect><delect id="2fwpw"></delect><noframes id="2fwpw"><rt id="2fwpw"></rt><bdo id="2fwpw"></bdo><delect id="2fwpw"></delect><delect id="2fwpw"><bdo id="2fwpw"></bdo></delect><noframes id="2fwpw"><noframes id="2fwpw"><delect id="2fwpw"><delect id="2fwpw"></delect></delect><rt id="2fwpw"></rt><delect id="2fwpw"></delect><delect id="2fwpw"></delect><bdo id="2fwpw"></bdo><bdo id="2fwpw"></bdo> <bdo id="2fwpw"><rt id="2fwpw"></rt></bdo><noframes id="2fwpw"><bdo id="2fwpw"></bdo><bdo id="2fwpw"></bdo><delect id="2fwpw"><rt id="2fwpw"></rt></delect><rt id="2fwpw"><rt id="2fwpw"></rt></rt><bdo id="2fwpw"><bdo id="2fwpw"></bdo></bdo><rt id="2fwpw"></rt><delect id="2fwpw"></delect><noframes id="2fwpw"><rt id="2fwpw"></rt><rt id="2fwpw"></rt><rt id="2fwpw"></rt><rt id="2fwpw"></rt><delect id="2fwpw"><noframes id="2fwpw"><noframes id="2fwpw"> <delect id="2fwpw"></delect><delect id="2fwpw"></delect><noframes id="2fwpw"><delect id="2fwpw"></delect><bdo id="2fwpw"></bdo><noframes id="2fwpw"><noframes id="2fwpw">