-
my problem:
i've written all of my help documentation in html. when someone needs help, i open their default web browser to view my html and minimize my program. i need to detect when my user's web browser (the one i just opened) is closed or minimized. When the user closes or minimizes the browser, i want my program to move itself back to the top.
any help is appreciated and thanks in advance!
-
Obtain the hWnd of the browser and set that to AlwaysOnTop using the SetWindowLong API Call.
-
sounds good and thank you. could you please tell me how to do this because i'm kindof new at vb. thanks.
-
Code:
Public Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
Sub LaunchHelp()
Dim BrowserhWnd
BrowserhWnd = FindWindow("Internet Explorer", VbNull)
If BrowserhWnd = 0 Then
BrowserhWnd = FindWindow("Netscape Navigator", VbNull)
End If
If BrowserhWnd = 0 Then
Msgbox "No capable internet browser installed."
Exit Sub
End If
'shellexcecute line goes here
End Sub
-
good, good. i'm starting to see what you mean. now what tells me when the browser gets closed or minimized?
[Edited by HAVocINCARNATE29 on 08-10-2000 at 12:57 AM]