Skip to content

Instantly share code, notes, and snippets.

@kumatti1
Created January 2, 2016 23:09
Show Gist options
  • Save kumatti1/e9178cd2fcd9d7ed7c1b to your computer and use it in GitHub Desktop.
Save kumatti1/e9178cd2fcd9d7ed7c1b to your computer and use it in GitHub Desktop.
DPI取得
Option Explicit
Private Declare PtrSafe _
Function GetWindowDPI Lib "user32.dll" ( _
ByVal hwnd As LongPtr _
) As Long
Sub hoge()
Dim hwnd&, ret&
hwnd = Application.hwnd
ret = GetWindowDPI(hwnd)
MsgBox ret
End Sub
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment