Type RECT Left As Long Top As Long Right As Long Bottom As Long End Type Public Const SPI_GETWORKAREA = 48 Declare Function SystemParametersInfo Lib "user32" Alias "SystemParametersInfoA" (ByVal uAction As Long, ByVal uParam As Long, lpvParam As Any, ByVal fuWinIni As Long) As Long Private Sub Command1_Click() Dim lRet As Long Dim apiRECT As RECT lRet = SystemParametersInfo(SPI_GETWORKAREA, vbNull, apiRECT, 0) If lRet Then Print "Left: " & apiRECT.Left Print "Top: " & apiRECT.Top Print "Width: " & apiRECT.Right - apiRECT.Left Print "Height: " & apiRECT.Bottom - apiRECT.Top Else Print "调用 SystemParametersInfo 失败" End If End Sub 其他方法: Sub Command1_Click() CR$ = Chr$(13) + Chr$(10) TWidth% = Screen.Width \ Screen.TwipsPerPixelX THeight% = Screen.Height \ Screen.TwipsPerPixelY MsgBox "屏幕大小为" + CR$ + CR$ + Str$(TWidth%) + " x" + Str$(THeight%), 64, "Info" End Sub