I am facing an issue with Dual Monitors in VB6, Please help me to find out the any one the following.
Currently I am using the existing Properties available in VB6.
Screen.Width
& Screen.Height
which gives me only the Primary Monitor's Width and Height.
You'll have to use Windows API to determine the virtual screen size for a multi-monitor setup:
Private Const SM_CXVIRTUALSCREEN = 78
Private Const SM_CYVIRTUALSCREEN = 79
Private Const SM_CMONITORS = 80
Private Const SM_SAMEDISPLAYFORMAT = 81
Private Declare Function GetSystemMetrics Lib "user32" ( _
ByVal nIndex As Long) As Long
Public Property Get VirtualScreenWidth() As Long
VirtualScreenWidth = GetSystemMetrics(SM_CXVIRTUALSCREEN)
End Property
Public Property Get VirtualScreenHeight() As Long
VirtualScreenHeight = GetSystemMetrics(SM_CYVIRTUALSCREEN)
End Property
Public Property Get DisplayMonitorCount() As Long
DisplayMonitorCount = GetSystemMetrics(SM_CMONITORS)
End Property
Public Property Get AllMonitorsSame() As Long
AllMonitorsSame = GetSystemMetrics(SM_SAMEDISPLAYFORMAT)
End Property
From vbAccelerator.com