Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/windows/14.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/vb.net/17.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Windows 使用VB.Net从外部应用程序阻止MsgBox_Windows_Vb.net_Block_Intercept_Msgbox - Fatal编程技术网

Windows 使用VB.Net从外部应用程序阻止MsgBox

Windows 使用VB.Net从外部应用程序阻止MsgBox,windows,vb.net,block,intercept,msgbox,Windows,Vb.net,Block,Intercept,Msgbox,有没有办法从外部应用程序截取MsgBox()并使用VB.Net阻止它 对于本讨论,假设MsgBox标题为“SQL应用程序”,消息为“SQL错误-重试” 我发现了一些例子,比如寻找弹出的MsgBox(通过观察窗口标题),然后发送按键按OK,但我很好奇整个过程是否可以避免。否则,用户仍然会看到MsgBox或“flash”,即使这只是暂时的 有可能避免这种情况吗?嗯,您可以使用类似迂回的方式(请参阅),并为加载到流程中的messagebox编写迂回,但有几个问题: 1) 它只有32位,除非你为专业版付

有没有办法从外部应用程序截取MsgBox()并使用VB.Net阻止它

对于本讨论,假设MsgBox标题为“SQL应用程序”,消息为“SQL错误-重试”

我发现了一些例子,比如寻找弹出的MsgBox(通过观察窗口标题),然后发送按键按OK,但我很好奇整个过程是否可以避免。否则,用户仍然会看到MsgBox或“flash”,即使这只是暂时的


有可能避免这种情况吗?

嗯,您可以使用类似迂回的方式(请参阅),并为加载到流程中的messagebox编写迂回,但有几个问题:

1) 它只有32位,除非你为专业版付费 2) 所涉及的开发工作可能是不平凡的,尤其是如果您没有很多内部C/C++经验的话。我想您可以为迂回编写一个托管包装,但这听起来也有点复杂。 3) 如果没有专业版,您无法在商业上使用它


这是您继承的应用程序吗?

不是,它与我放在表单上的控件绑定。它有一个MsgBox,在某些情况下可以启动,但我需要隐藏它。没有触发控件的事件,所以我无法以这种方式拦截。对于那些想知道的人,没有。。。我想阻止的不是即将出现的授权(唠叨屏幕)消息。都是合法的。不,他们不能。谢谢,但我更愿意专注于这个问题。谢谢你的回答。我查看了绕道路线。我希望.Net有一个更“内置”的东西。如果没有其他答案,我会接受你的。从技术上讲,它符合我的要求。