【发布时间】:2014-09-11 07:48:10
【问题描述】:
我在我的服务中使用 Process_Exited 事件,它会获取除 Internet Explorer 退出事件之外的所有事件,它会在所有资源管理器窗口关闭时获取事件,但是当我一一关闭资源管理器时,我的函数仅在最终事件时获取事件explorer 被关闭,因此该函数只能获取一个进程 ID,而不是所有 iexplorer 进程 ID
这是我的方法
Private Sub Process_Exited(ByVal sender As Object, ByVal e As System.EventArgs)
Dim lObj_CurrPro As Process
Try
'
' Make sure that the sender object is of process type to avoid unforseen errors
'
If TypeOf sender Is Process Then
lObj_CurrPro = sender
Call StopTracking(lObj_CurrPro.Id)
End If
Catch
End Try
End Sub
注意:我使用的是 Iexplorer8,但其进程存在问题。即使关闭 iexplorer 窗口,进程也不会退出
【问题讨论】:
-
好吧,从技术上讲,当您打开/关闭窗口并至少打开 1 个窗口时,IE 进程仍在运行。我猜你真的想更多地寻找窗口何时关闭事件,而不是进程退出事件。
-
我想要的是在用户关闭 IE 窗口时得到一个退出事件。
-
你试过 windows.close() 事件吗? msdn.microsoft.com/en-us/library/…
-
我想在 IE 窗口关闭时获取事件 window.close() 用于手动关闭窗口
标签: vb.net internet-explorer process