以文本方式查看主题

-  Foxtable(狐表)  (http://foxtable.com/bbs/index.asp)
--  专家坐堂  (http://foxtable.com/bbs/list.asp?boardid=2)
----  关闭Foxtable软件更新提示  (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=124589)

--  作者:ryubo888
--  发布时间:2018/9/10 10:01:00
--  关闭Foxtable软件更新提示
我想在程序里加入关闭Foxtable软件更新提示,怎么写代码?大神指教
--  作者:有点甜
--  发布时间:2018/9/10 10:18:00
--  

你指哪里的提示?foxtable版本的提示?

 

http://www.foxtable.com/webhelp/scr/2713.htm

 


--  作者:ryubo888
--  发布时间:2018/9/10 14:46:00
--  
是关闭foxtable版本更新的提示
--  作者:有点甜
--  发布时间:2018/9/10 14:55:00
--  
以下是引用ryubo888在2018/9/10 14:46:00的发言:
是关闭foxtable版本更新的提示

 

截图说明什么提示。如果foxtable最新版的提示,是无法关闭的。


--  作者:ryubo888
--  发布时间:2018/9/10 15:18:00
--  
哦,就是这样的提示,我想关闭它
图片点击可在新窗口打开查看此主题相关图片如下:1536563731(1).png
图片点击可在新窗口打开查看
大神们帮帮想想办法吧!!!
[此贴子已经被作者于2018/9/10 15:18:57编辑过]

--  作者:有点甜
--  发布时间: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)")


--  作者:ryubo888
--  发布时间:2018/9/10 18:09:00
--  
非常感谢
--  作者:liuqide
--  发布时间:2018/9/11 8:48:00
--  
foxtable版本更新,一直不断地提示升级,确实很烦,我暂时是不需要升级的,担心升级会影响到目前的项目,建议官方能增加是否提示升级这个开关
--  作者:blackzhu
--  发布时间: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() 全部关闭了?


--  作者:有点蓝
--  发布时间:2019/7/16 10:13:00
--  
MessageBox.Show() 不要使用“提示”这种标题