Results 1 to 13 of 13

Thread: popup blocking

  1. #1

    Thread Starter
    Fanatic Member jian2587's Avatar
    Join Date
    Aug 2000
    Location
    I bet u need a fusion powered shuttle to reach my place...
    Posts
    963

    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

  2. #2
    Need-a-life Member Mc Brain's Avatar
    Join Date
    Apr 2000
    Location
    Buenos Aires, Argentina
    Posts
    6,808
    This seems to be working
    Attached Files Attached Files
    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.

  3. #3

    Thread Starter
    Fanatic Member jian2587's Avatar
    Join Date
    Aug 2000
    Location
    I bet u need a fusion powered shuttle to reach my place...
    Posts
    963
    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

  4. #4
    Need-a-life Member Mc Brain's Avatar
    Join Date
    Apr 2000
    Location
    Buenos Aires, Argentina
    Posts
    6,808
    Have you tried it? I'm not that sure about what you say.
    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.

  5. #5
    Need-a-life Member Mc Brain's Avatar
    Join Date
    Apr 2000
    Location
    Buenos Aires, Argentina
    Posts
    6,808
    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.

  6. #6

    Thread Starter
    Fanatic Member jian2587's Avatar
    Join Date
    Aug 2000
    Location
    I bet u need a fusion powered shuttle to reach my place...
    Posts
    963
    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

  7. #7

    Thread Starter
    Fanatic Member jian2587's Avatar
    Join Date
    Aug 2000
    Location
    I bet u need a fusion powered shuttle to reach my place...
    Posts
    963
    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

  8. #8
    Need-a-life Member Mc Brain's Avatar
    Join Date
    Apr 2000
    Location
    Buenos Aires, Argentina
    Posts
    6,808
    I might have improved the code somehow.... because I can kill the popup (of that page) if I wanted to.
    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.

  9. #9

    Thread Starter
    Fanatic Member jian2587's Avatar
    Join Date
    Aug 2000
    Location
    I bet u need a fusion powered shuttle to reach my place...
    Posts
    963
    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

  10. #10
    Need-a-life Member Mc Brain's Avatar
    Join Date
    Apr 2000
    Location
    Buenos Aires, Argentina
    Posts
    6,808
    I meant not to leave the popup live ---> kill the popup (don't open it)

    I don't think it would work with the banners of Geocities.
    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.

  11. #11

    Thread Starter
    Fanatic Member jian2587's Avatar
    Join Date
    Aug 2000
    Location
    I bet u need a fusion powered shuttle to reach my place...
    Posts
    963
    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

  12. #12
    Need-a-life Member Mc Brain's Avatar
    Join Date
    Apr 2000
    Location
    Buenos Aires, Argentina
    Posts
    6,808
    You can not "refresh" because it would download the whole html again. You should download, erase all the javascript that creates the banner and load this edited html. BTW.... I've not the clueless idea how to do it. Besides, each single page will have a different way to "pops" their banners.
    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.

  13. #13

    Thread Starter
    Fanatic Member jian2587's Avatar
    Join Date
    Aug 2000
    Location
    I bet u need a fusion powered shuttle to reach my place...
    Posts
    963
    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
  •  



Click Here to Expand Forum to Full Width