vb.net在高DPI下禁止UI缩放的问题

huangshanse 2012-01-20 04:59:35
当DPI不是96时就会自动缩放程序界面UI 使得程序变形 变得很丑
找了半天 看到MSDN上有说明,但是用了根本无效,来求助各位大侠!
其他办法想尽了脑汁就是想不出来

MSDN代码:

Structure CursorPoint
Public X As Integer
Public Y As Integer
End Structure

<System.Runtime.InteropServices.DllImport("user32.dll")> _
Friend Shared Function GetPhysicalCursorPos(ByRef lpPoint As CursorPoint) As Boolean
End Function

Private Function ShowUsage() As Boolean

Dim cursorPos As New CursorPoint()
Try
Return GetPhysicalCursorPos(cursorPos)
Catch e As EntryPointNotFoundException ' Not Windows Vista
Return False
End Try

End Function

原文地址:http://msdn.microsoft.com/zh-cn/library/aa970067.aspx
...全文
515 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
impasse 2012-01-29
  • 打赏
  • 举报
回复
帮顶,DPI现在问题很明显了,很多人都有笔记本,屏比较小

16,555

社区成员

发帖
与我相关
我的任务
社区描述
VB技术相关讨论,主要为经典vb,即VB6.0
社区管理员
  • VB.NET
  • 水哥阿乐
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧