|
-
May 15th, 2002, 07:39 AM
#1
Thread Starter
Fanatic Member
popup blocking
Well, I've declared
Dim WithEvents objExp as InternetExplorer
Dim Sws as ShDocVw.ShellWindows
Dim objIE as ShDocVw.InternetExplorer
Then I code this
For Each objIE In Sws
Set ObjExp = objIE
Next
In the NewWindow2 event of objExp
Cancel = True
If u read through this code, u'll know that I am looping through
all IE windows and check for their events.
Unfortunately, there might be a time where while my code is
checking one IE's event, another IE's event has fired and ended
gracefully, and by the time I check for this IE's event, I can't
detect the event if it's fired. Because the event has already fired
and ended but my code can't check if it's fired yet since the event
has already ended.
So, I was thinking if I can Dim WithEvents an array of IE objects.
But apparently it won't work, and so I hope anybody can help
me in detecting all IE's event simultaneously.
Thanks
ASM,C,C++,BASIC,VB,JAVA,VBS,HTML,ASP,PHP,mySQL,VB.NET,MATLAB
Programming is fun, but only if you're not on a tight deadline 
So I consider all those working engineers sad people
VB FTP class
3 page PHP crash course
Crash Course on DX9 Managed with VB.NET covering basics till terrain creation
-
May 15th, 2002, 08:51 AM
#2
Need-a-life Member
-
May 15th, 2002, 08:18 PM
#3
Thread Starter
Fanatic Member
Thanks for your kind help, but it didn't work.
I've thought of using Class, but I am quite unfamiliar with Class
Your code adds new IE hwnd all the time, but its the same with
my method.
It checks one IE event at one time, because you loops through
them and set your class to point to that IE.
As mentioned earlier, there might be a time where while you're
setting this IE's hwnd to point to the class, another IE has fired
the NewWindow2 event and ended without u knowing it.
Pls?
ASM,C,C++,BASIC,VB,JAVA,VBS,HTML,ASP,PHP,mySQL,VB.NET,MATLAB
Programming is fun, but only if you're not on a tight deadline 
So I consider all those working engineers sad people
VB FTP class
3 page PHP crash course
Crash Course on DX9 Managed with VB.NET covering basics till terrain creation
-
May 15th, 2002, 08:22 PM
#4
-
May 15th, 2002, 08:26 PM
#5
Need-a-life Member
Originally posted by jian2587
Thanks for your kind help, but it didn't work.
I've thought of using Class, but I am quite unfamiliar with Class
Your code adds new IE hwnd all the time, but its the same with
my method.
It checks one IE event at one time, because you loops through
them and set your class to point to that IE.
As mentioned earlier, there might be a time where while you're
setting this IE's hwnd to point to the class, another IE has fired
the NewWindow2 event and ended without u knowing it.
Pls?
I'm not adding new hwnd all the time. I'm only creating a new object and set it to the new IE opened. So, I could have 4, 5, 6 (whatever) objects loaded in memory, each one "pointing" to one IE. So, if each object worked as it should it, all the events should be fired. I'd dare say that my method is much different from yours (excluding the main code, which was your idea)
Emiliano F. Martín
If a post has helped you then please Rate it! (and give the user points he/she deserves by clicking on the image).
Encourage the person who helped you to keep doing it, and give him the points he deserves.
MP3 Organizer: Freeware to logically organize all your MP3s.
-
May 15th, 2002, 08:47 PM
#6
Thread Starter
Fanatic Member
well,u're right, but it didn't work for me.
ASM,C,C++,BASIC,VB,JAVA,VBS,HTML,ASP,PHP,mySQL,VB.NET,MATLAB
Programming is fun, but only if you're not on a tight deadline 
So I consider all those working engineers sad people
VB FTP class
3 page PHP crash course
Crash Course on DX9 Managed with VB.NET covering basics till terrain creation
-
May 15th, 2002, 09:07 PM
#7
Thread Starter
Fanatic Member
Ah, I've figured out the problem.
I am running a few instances of IE, and the IE I was testing
is the last one. I use www.cheatcc.com/frames.html to test it.
Apparently your code doesn't add(or detect?) the last instance,
so the popup pops. So, in conclusion, ur code actually works!
Actually, u're genius, ur code runs great, just buggy hehe
ASM,C,C++,BASIC,VB,JAVA,VBS,HTML,ASP,PHP,mySQL,VB.NET,MATLAB
Programming is fun, but only if you're not on a tight deadline 
So I consider all those working engineers sad people
VB FTP class
3 page PHP crash course
Crash Course on DX9 Managed with VB.NET covering basics till terrain creation
-
May 15th, 2002, 09:25 PM
#8
-
May 15th, 2002, 10:16 PM
#9
Thread Starter
Fanatic Member
Oh,that'll be great.
U've somehow introduced me to class programming and solved
my biggest problem.
Indeed, class is great.
What do u mean by killing the popup?
Isn't it Cancel = True in the NewWindow2 event?
Do u mean those pesky banners such as those contained inside
a website like Geocities?
ASM,C,C++,BASIC,VB,JAVA,VBS,HTML,ASP,PHP,mySQL,VB.NET,MATLAB
Programming is fun, but only if you're not on a tight deadline 
So I consider all those working engineers sad people
VB FTP class
3 page PHP crash course
Crash Course on DX9 Managed with VB.NET covering basics till terrain creation
-
May 15th, 2002, 10:23 PM
#10
-
May 15th, 2002, 10:28 PM
#11
Thread Starter
Fanatic Member
Sure it won't work with Geocities's banners
How about getting the HTML code off that particular IE object and
search for the banner code and remove it and then refresh the
whole thing?
ASM,C,C++,BASIC,VB,JAVA,VBS,HTML,ASP,PHP,mySQL,VB.NET,MATLAB
Programming is fun, but only if you're not on a tight deadline 
So I consider all those working engineers sad people
VB FTP class
3 page PHP crash course
Crash Course on DX9 Managed with VB.NET covering basics till terrain creation
-
May 15th, 2002, 10:31 PM
#12
-
May 15th, 2002, 10:35 PM
#13
Thread Starter
Fanatic Member
In the first place, by refreshing I mean refresh the edited HTML.
For checking the banner codes, u've to code an intelligent
search engine to search for the banner codes.
AdsGone can block the banners, right?
I'ven't try it, but I think this app also uses this same approach
ASM,C,C++,BASIC,VB,JAVA,VBS,HTML,ASP,PHP,mySQL,VB.NET,MATLAB
Programming is fun, but only if you're not on a tight deadline 
So I consider all those working engineers sad people
VB FTP class
3 page PHP crash course
Crash Course on DX9 Managed with VB.NET covering basics till terrain creation
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
|