To find the size of the monitor, I've been using:
Declare Function GetSystemMetrics32 Lib "user32" Alias "GetSystemMetrics" (ByVal Index As Long) As Long
and then:
Function getMonitorSize()
monitorHeight = GetSystemMetrics32(1)
monitorWidth = GetSystemMetrics32(0)
End Function
This works fine for the main monitor, but how do I find the size of an external monitor?
EnumDisplayDevices
tells you something about a monitor with a certain index. You can increment the index from 0 to whatever, until the function returns 0, which means there's no monitor with that index.Then you call
EnumDisplaySettings
to figure the size.