回复 8F 帅哥阿福 的帖子
汗.....你不是吧.......可以用个函数来判断,
我只会VB的
'新增模块,并附上如下代码。
'判断是否有全屏任务
Option Explicit
Private Declare Function GetWindowRect Lib "user32" (ByVal hwnd As Long, lpRect As RECT) As Long
Private Type RECT
Left As Long
Top As Long
Right As Long
Bottom As Long
End Type
Private Declare Function GetForegroundWindow Lib "user32" () As Long
Public Function IfFullScreen() As Boolean
Dim Rc As RECT, lhwnd&
lhwnd = GetForegroundWindow
If lhwnd > 0 And GetWindowRect(lhwnd, Rc) Then
With Screen
IfFullScreen = (Rc.Right - Rc.Left >= .Width / .TwipsPerPixelX) And (Rc.Bottom - Rc.Top >= .Height / .TwipsPerPixelY)
End With
End If
End Function
程序代码
'判断是否有全屏任务
Private Sub Timer1_Timer() '页面点击
debug.print now() &" "&IfFullScreen
End Sub