getresolution.txt
来自「一部分关于VB编程的小技巧」· 文本 代码 · 共 24 行
TXT
24 行
Option Explicit
Private Declare Function GetSystemMetrics Lib "user32" (ByVal nIndex As Long) As Long
Private Const SM_CXSCREEN = 0
Private Const SM_CYSCREEN = 1
Public cX As Integer
Public cY As Integer
Public Function GetScreenResolution640x480() As Boolean
Dim lTemp As String
lTemp = GetSystemMetrics(SM_CXSCREEN) & "x" & GetSystemMetrics(SM_CYSCREEN)
If lTemp = "640x480" Then
GetScreenResolution640x480 = True
Else
GetScreenResolution640x480 = False
End If
End Function
Public Function PutScreenResIntoVariables()
Dim lTemp As String
cX = GetSystemMetrics(SM_CXSCREEN)
cY = GetSystemMetrics(SM_CYSCREEN)
End Function
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?