vb.net在高DPI下禁止UI缩放的问题
当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