在win10系统使用中,CanLoadResource方法有时会导致程序挂起,无法进行任何操作,代码不执行。但是在win7系统下使用是正常的。为什么会这样?
拦截请求。
Public Function CanLoadResource(resourceParams As ResourceParams) As Boolean Implements ResourceHandler.CanLoadResource
If resourceParams.URL.Contains("gallery?") Then
GM.theReadForm.Invoke(GM.theReadForm.MIBActionGaller, resourceParams.URL)
Return False
End If
Return True
End Function
GM.theReadForm.MIBActionGaller 委托注册了一个非常简单的方法。
Private Sub OnMIBActionGalleryCallback(ByVal urlstring As String)
MessageBox.Show("OK")
End Sub
你经历过像我这样的事情吗?
成功日志: 在此处输入图像描述
错误日志: 在此处输入图像描述