Office中国论坛/Access中国论坛

标题: 如何识别屏幕分辨率? [打印本页]

作者: 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

'测试:
'? GetScreenResolution()
'1024*768

'说明:
'其实本站中就有
作者: guotianxin    时间: 2003-1-8 18:10
去我的网上下载机票打印程序,哪里有分辨率识别的例子。
你只要改变你的屏幕分辨率,窗体大小就自动会改变。
www.lanbuild.com
作者: zhengjialon    时间: 2003-1-8 21:15
刷新频率可否更改,更改后每次都会自动跳到60。




欢迎光临 Office中国论坛/Access中国论坛 (http://www.office-cn.net/) Powered by Discuz! X3.3