用API函数
Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
If FindWindow(vbNullString, "安全信息") or FindWindow(vbNullString, "安全警报") Then
调用SendMessage来关闭窗体
end if
和关闭API函数
Private Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Integer, ByVal lParam As Any) As Long
用API函数
Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
If FindWindow(vbNullString, "安全信息") or FindWindow(vbNullString, "安全警报") Then
调用SendMessage来关闭窗体
end if