-
April 20th, 2006, 04:01 AM
#1
FindWindow & Close Window
Are you often annoyed by the auto pop-up IE window?
That's why I want to write a program to find and close all such pop windows. I noticed a kind of window by spy++. Its class is "Internet Explorer_Server". And I tried the following code:
Dim hwnd As Long
hwnd = FindWindow("Internet Explorer_Server", vbNullString)
If hwnd <> 0 Then
SendMessage hwnd, WM_CLOSE, 0&, 0&
End If
The hwnd is always 0 though there is a pop window which class is "Internet Explorer_Server"!
What's the problem?
-
April 20th, 2006, 04:18 AM
#2
Re: FindWindow & Close Window
Well I think you have got it wrong. Any IE Window will have the Class name of IEFrame and the any child window like the page will have the class name of "Internet Explorer_Server".
The reason why your HWND is always zero is because the window that you are trying to search for is a child window of IEFrame class.
Why would you want to write a program for something that is already present in Internet Explorer. I am using IE 6 on Win XP SP2 and I don't get any pop-ups.
-
April 20th, 2006, 04:19 AM
#3
Re: FindWindow & Close Window
@AskProf: Have a look here !
-
April 20th, 2006, 04:23 AM
#4
Re: FindWindow & Close Window
@hans that link doesnt seem to work for me.
-
April 20th, 2006, 04:24 AM
#5
Re: FindWindow & Close Window
OOps my mistake, it works now, never mind
-
April 20th, 2006, 04:30 AM
#6
Re: FindWindow & Close Window
@Intercepter: You had me worried for a while, glad you got the link to work!
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
|