Results 1 to 4 of 4

Thread: Webbrowser New_Window Event

  1. #1

    Thread Starter
    New Member
    Join Date
    Jul 2012
    Posts
    6

    Webbrowser New_Window Event

    I am working on a project which adds a web browser to the form dynamically during runtime. I need to have all links displayed on a given webpage to open via that same web browser control. I successfully created the new_window event code to do so...I just can't figure out how to add it to the project for a web browser that gets added during runtime. Any help is greatly appreciated!

  2. #2
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    110,347

    Re: Webbrowser New_Window Event

    It's the same for any object not assigned to a variable declared WithEvents. You use an AddHandler statement. Just make sure that you use a RemoveHandler statement when you're done with the object.

  3. #3

    Thread Starter
    New Member
    Join Date
    Jul 2012
    Posts
    6

    Re: Webbrowser New_Window Event

    Thank you for the quick reply. Unfortunately, I am rather new to programming and have never used an "AddHandler" statement. Could you please give an example of how I may execute this?

  4. #4
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    110,347

    Re: Webbrowser New_Window Event

    What did you not understand about the many examples you found on the web when you searched?

Tags for this Thread

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