|
-
January 23rd, 2003, 10:47 AM
#1
How to auto-close inactive Internet Explorer Window
I am writing a program to auto-close Internet Explorer (IE) session if there are no activities for a certain period.
I got 2 problems.
1. Can not close the IE Window.
I am using EnumWindows to loop through all the windows and get the handle to a IE, then I use "DestroyWindow(hWnd);" to close the IE. NOT working. What function should I call to close a running application window ?
2. How to know that an IE session is idle for a certain period already ?
Thanks in advance.
Leslie Guo
-
January 23rd, 2003, 11:38 AM
#2
You say you have the handle to IE. Try posting a WM_QUIT message to it: PostMessage(hwnd, WM_QUIT). If that doesn't work, try PostThreadMessage().
Gort...Klaatu, Barada Nikto!
-
January 24th, 2003, 07:50 AM
#3
tried but not working.
Now I am going to get the process handle and use TerminateProcess()
Anyone know how to know if the process is inactive and for how long ?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|