Foxtable(狐表)用户栏目专家坐堂 → 关闭Foxtable软件更新提示


  共有4371人关注过本帖树形打印复制链接

主题:关闭Foxtable软件更新提示

帅哥哟,离线,有人找我吗?
blackzhu
  1楼 | QQ | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信 一级勋章
等级:狐仙 帖子:9879 积分:57634 威望:0 精华:15 注册:2008/9/1 9:45:00
  发帖心情 Post By:2019/7/16 9:48:00 [显示全部帖子]

以下是引用有点甜在2018/9/10 16:15: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 hwndText As IntPtr = FindWindowEx(hwnd, 0, Nothing, "请设置浏览器的安全级别.启用activeX脚本!")
    'If hwndText <> 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 If
End Sub

 

调用代码,你可以做一个定时器,定时执行

 

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



这样是不是将MessageBox.Show() 全部关闭了?


 回到顶部
帅哥哟,离线,有人找我吗?
blackzhu
  2楼 | QQ | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信 一级勋章
等级:狐仙 帖子:9879 积分:57634 威望:0 精华:15 注册:2008/9/1 9:45:00
  发帖心情 Post By:2019/7/16 10:22:00 [显示全部帖子]

哦 明白了

 回到顶部