以文本方式查看主题

-  Foxtable(狐表)  (http://www.foxtable.com/bbs/index.asp)
--  专家坐堂  (http://www.foxtable.com/bbs/list.asp?boardid=2)
----  一会儿跳出升级烦死了  (http://www.foxtable.com/bbs/dispbbs.asp?boardid=2&id=107090)

--  作者:hbhb
--  发布时间:2017/9/21 10:25:00
--  一会儿跳出升级烦死了
大师:请问如何赶走升级提示信息。
--  作者:有点甜
--  发布时间:2017/9/21 12:10:00
--  

全局代码

 

<DllImport("user32.dll", EntryPoint := "FindWindow", SetLastError := True)> _
Public Function FindWindow(lpClassName As String, lpWindowName As String) As IntPtr
End Function

<DllImport("user32.dll", EntryPoint := "FindWindowEx", SetLastError := True)> _
Public Function FindWindowEx(hwndParent As IntPtr, hwndChildAfter As UInteger, lpszClass As String, lpszWindow As String) As IntPtr
End Function

<DllImport("user32.dll", EntryPoint := "SendMessage", SetLastError := True, CharSet := CharSet.Auto)> _
Public Function SendMessage(hwnd As IntPtr, wMsg As UInteger, wParam As IntPtr, lParam As Integer) As Integer
End Function

Public Sub CloseWin(winTitle As String, buttonTitle As String)
Dim hwnd As IntPtr = FindWindow(Nothing, winTitle)
If hwnd <> IntPtr.Zero Then

    Dim hwndSure As IntPtr = FindWindowEx(hwnd, 0, "Button", buttonTitle)
    If hwnd <> IntPtr.Zero Then
        SendMessage(hwndSure, &Hf5, 0, 0)
        \'按她
    End If
End If
End Sub

 

做个计划任务,不断执行下面代码

 

CloseWin("提示", "否(&N)")