标题: 如何识别屏幕分辨率? [打印本页] 作者: xingzhihao 时间: 2003-1-8 03:08 标题: 如何识别屏幕分辨率? 如何识别屏幕分辨率?
如何设置屏幕分辨率?[em04]作者: huanghai 时间: 2003-1-8 05:57
查旧帖作者: huanghai 时间: 2003-1-8 06:20
Option Compare Database
Option Explicit
Type RECT
x1 As Long
y1 As Long
x2 As Long
y2 As Long
End Type
Declare Function GetDesktopWindow Lib "User32" () As Long
Declare Function GetWindowRect Lib "User32" (ByVal hwnd As Long, rectangle As RECT) As Long
Function GetScreenResolution() As String
Dim R As RECT
Dim hwnd As Long
Dim RetVal As Long
hwnd = GetDesktopWindow()
RetVal = GetWindowRect(hwnd, R)
GetScreenResolution = (R.x2 - R.x1) & "*" & (R.y2 - R.y1)
End Function