Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
one or two monitors
Is there any way to determine if a user is using two monitors?
Bob Flanagan |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
one or two monitors
Yes. I finally got it to work with this webpage
http://www.xtremevbtalk.com/showthread.php?t=289231 Const MONITOR_DEFAULTTONULL As Long = 0 Const MONITOR_DEFAULTTOPRIMARY As Long = 1 Const MONITOR_DEFAULTTONEAREST As Long = 2 Type RECT left As Long top As Long right As Long bottom As Long End Type Type LPMONITORINFO cbSize As Double rcMonitor As RECT rcWork As RECT dwflags As Long End Type Private Declare Function GetNumberOfPhysicalMonitorsFromHMONITOR Lib "dxva2.dll" _ (ByVal hmonitor As Long, ByRef pdwNumberOfPhysicalMonitors As LPMONITORINFO) As Long Private Declare Function MonitorFromWindow Lib "user32.dll" _ (ByVal hWind As Long, ByVal dwflags As Long) As Long Sub test() Dim hWind As Long Dim hmonitor As Long Dim flags As Long Dim monInfo As LPMONITORINFO hWind = Application.hwnd A = Len(hWind) flags = MONITOR_DEFAULTTOPRIMARY monInfo.cbSize = Len(monInfo) hmonitor = MonitorFromWindow(hWind, flags) NumMonitors = GetNumberOfPhysicalMonitorsFromHMONITOR(hmonitor, monInfo) End Sub "Robert Flanagan" wrote: Is there any way to determine if a user is using two monitors? Bob Flanagan |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Dual monitors | Excel Discussion (Misc queries) | |||
Two Monitors | Excel Programming | |||
2 monitors | Setting up and Configuration of Excel | |||
2 monitors - Excel 97 | Excel Discussion (Misc queries) | |||
Using Two Monitors | Excel Programming |