注册 登录
Office中国论坛/Access中国论坛 返回首页

的个人空间 http://www.office-cn.net/?0 [收藏] [复制] [分享] [RSS]

日志

获得屏幕分辩率的函数

已有 871 次阅读2008-1-27 15:08

Option Compare Database
Private Declare Function GetDC Lib "user32" (ByVal hwnd As Long) As Long
Private Declare Function GetDeviceCaps Lib "gdi32" (ByVal hdc As Long, ByVal nIndex As Long) As Long
Public Function getscreenw() As Long
'获得屏幕分辩率的长
    hdc = GetDC(0)
    getscreenw = GetDeviceCaps(hdc, 8)
End Function
Public Function getscreenh() As Long
'获得屏幕分辩率的高
    hdc = GetDC(0)
    getscreenh = GetDeviceCaps(hdc, 10)
End Function
'获得屏幕分辩率的长的TIPS
Public Function getscreenwT() As Long
    hdc = GetDC(0)
    getscreenwT = GetDeviceCaps(hdc, 8) * 15
End Function
'获得屏幕分辩率的高的TIPS
Public Function getscreenhT() As Long
    hdc = GetDC(0)
    getscreenhT = GetDeviceCaps(hdc, 10) * 15
End Function

评论 (0 个评论)

facelist doodle 涂鸦板

您需要登录后才可以评论 登录 | 注册

QQ|站长邮箱|小黑屋|手机版|Office中国/Access中国 ( 粤ICP备10043721号-1 )  

GMT+8, 2024-5-3 06:47 , Processed in 0.053418 second(s), 13 queries .

Powered by Discuz! X3.3

© 2001-2017 Comsenz Inc.

返回顶部