发信人: shiny()
整理人: kamkam(2002-05-04 21:34:23), 站内信件
|
【 在 egrand007 的大作中提到:】
: SOS!!!帮忙找找!
:......
从一本书上转的:
声明部分:(Declaration)
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
Private Sub CheckResolution()
Dim R as Rect
Dim hWnd As Long
Dim RetVal As Long
Dim GetScreenResolution As String
hWnd = GetDesktopWindow(0
RetVal = GetWindowRect(hWnd,R)
If RetVal = 0 Then Goto Win32Error
GetScreenResolution = (R.x2 - R.x1) & "x" ( R.y2 - R.y1)
If GetScreenResolution <> "800X600" then
Messagebox "你的当前屏幕分辫率是"&GetScreenResolution &_
"。要获得最佳视觉效果,请使用800x600分辫率",_
0,"警告:请检查屏幕分辫率"
End If
Exit Sub
Win32Error:
Messagebox "Error"
End Sub
总之就是调用系统API函数,上面程序我还没试过,你试看看! |
|