goodfela26
MIS
Hi,
I'm trying to figure out how to determine if Internet Explorer is currently running.
I've tried the following, but it isn't working for me. I found the code below from a search on google. I don't remember which site, and I closed my IE before I bookmarked the site.
Private Declare Function GetClassName Lib "user32" Alias "GetClassNameA" (ByVal _
hwnd As Long, ByVal lpClassName As String, ByVal nMaxCount As Long) As Long
' Return the class name of the specified window
' Example: MsgBox GetWindowClass(Me.hWnd)
Function GetWindowClass(ByVal hwnd As Long) As String
Dim sClass As String
sClass = Space$(256)
GetClassName hwnd, sClass, 255
GetWindowClass = Left$(sClass, InStr(sClass, vbNullChar) - 1)
End Function
Private Sub Form_Load()
MsgBox fIsAppRunning("IEFrame.Application"
'The class of Internet Explorer is "IEFrame".
End Sub
Any ideas??
Thanks,
Bob
---------------------------------------
Bob Beck
IS Administrator
In my limited experience, 80-90% of all problems brought to my attention can be attributed to PEBCAK...the other 10-20% can be attributed to MS!
I'm trying to figure out how to determine if Internet Explorer is currently running.
I've tried the following, but it isn't working for me. I found the code below from a search on google. I don't remember which site, and I closed my IE before I bookmarked the site.
Private Declare Function GetClassName Lib "user32" Alias "GetClassNameA" (ByVal _
hwnd As Long, ByVal lpClassName As String, ByVal nMaxCount As Long) As Long
' Return the class name of the specified window
' Example: MsgBox GetWindowClass(Me.hWnd)
Function GetWindowClass(ByVal hwnd As Long) As String
Dim sClass As String
sClass = Space$(256)
GetClassName hwnd, sClass, 255
GetWindowClass = Left$(sClass, InStr(sClass, vbNullChar) - 1)
End Function
Private Sub Form_Load()
MsgBox fIsAppRunning("IEFrame.Application"
End Sub
Any ideas??
Thanks,
Bob
---------------------------------------
Bob Beck
IS Administrator
In my limited experience, 80-90% of all problems brought to my attention can be attributed to PEBCAK...the other 10-20% can be attributed to MS!