如果电脑接了多个屏幕 vb6的窗体如何才能知道自己在哪个屏幕? 又如何知道当前屏幕的分辨率

如果电脑接了多个屏幕 vb6的窗体怎么才能知道自己在哪个屏幕? 又怎么知道当前屏幕的分辨率?
如果电脑接了多个屏幕 vb6的窗体怎么才能知道自己在哪个屏幕? 又怎么知道当前屏幕的分辨率?


现在的实际问题是,无论我的窗体在哪个屏幕中,调用Screen对象,都是取得的第一个屏幕的信息

------解决方案--------------------
每个屏幕都有一个rect属性的,通过程序的坐标就能知道在哪个屏幕上
检测有几个屏幕以及每个屏幕的rect属性如下
VB code
Option Explicit

Public Const MONITORINFOF_PRIMARY = &H1
Public Const MONITOR_DEFAULTTONEAREST = &H2
Public Const MONITOR_DEFAULTTONULL = &H0
Public Const MONITOR_DEFAULTTOPRIMARY = &H1
Public Type RECT
    Left As Long
    Top As Long
    Right As Long
    Bottom As Long
End Type
Public Type MONITORINFO
    cbSize As Long
    rcMonitor As RECT
    rcWork As RECT
    dwFlags As Long
End Type

Public Declare Function GetMonitorInfo Lib "user32.dll" Alias "GetMonitorInfoA" _
    (ByVal hMonitor As Long, ByRef lpmi As MONITORINFO) As Long
Public Declare Function EnumDisplayMonitors Lib "user32.dll" (ByVal hdc As Long, _
    ByRef lprcClip As Any, ByVal lpfnEnum As Long, ByVal dwData As Long) As Long
Public Declare Function MoveWindow Lib "user32" (ByVal hwnd As Long, ByVal X As _
    Long, ByVal y As Long, ByVal nWidth As Long, ByVal nHeight As Long, ByVal _
    bRepaint As Long) As Long
Public Scr() As RECT
Public ScrSum As Long
Public Function MonitorEnumProc(ByVal hMonitor As Long, ByVal hdcMonitor As Long, _
                                lprcMonitor As RECT, ByVal dwData As Long) As Long
    Dim MI As MONITORINFO, R As RECT
    MI.cbSize = Len(MI)
    GetMonitorInfo hMonitor, MI
    
    R = MI.rcWork
    ScrSum = ScrSum + 1
    ReDim Preserve Scr(ScrSum)
    Scr(ScrSum) = R
    'If CBool(MI.dwFlags = MONITORINFOF_PRIMARY) Then '第一显示器
    '    MoveWindow Form1.hwnd, R.Left, R.Top, R.Right - R.Left, R.Bottom - R.Top, 1&
    'Else
    '    MoveWindow Form2.hwnd, R.Left, R.Top, R.Right - R.Left, R.Bottom - R.Top, 1&
    'End If
    MonitorEnumProc = 1
End Function

Public Sub CheckMonitor()
ScrSum = 0
EnumDisplayMonitors ByVal 0&, ByVal 0&, AddressOf MonitorEnumProc, ByVal 0&
End Sub