Results 1 to 4 of 4

Thread: Get Event

  1. #1

    Thread Starter
    Hyperactive Member Philly0494's Avatar
    Join Date
    Apr 2008
    Posts
    485

    Get Event

    Code:
    Public Class CustomBrowser
        Inherits WebBrowser 
    
        Private Sub DocCompleted() Handles Me.DocumentCompleted
       'etc
        End Sub
        Private Sub NewWin(ByVal sender As Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles Me.NewWindow
            e.Cancel = True
        End Sub
    The Me.DocumentCompleted works fine, and i have access to alot of webBrowser events

    But Me.NewWindow is not recognized... web browsers should have a NewWindow event built in.. i have used it in other Vb.Net 2008 apps

    Any way i can get the NewWindow event?


    NVM: i found it as MyBase.NewWindow
    Last edited by Philly0494; May 23rd, 2009 at 03:10 PM.

  2. #2
    PowerPoster keystone_paul's Avatar
    Join Date
    Nov 2008
    Location
    UK
    Posts
    3,327

    Re: Get Event

    I'm missing something here, either that or you are...

    Code:
        Private Sub NewWindow(ByVal sender As Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles Me.
            e.Cancel = True
        End Sub
    The Handles clause at the end is incomplete - or is this just a cut and paste error?

  3. #3
    PowerPoster keystone_paul's Avatar
    Join Date
    Nov 2008
    Location
    UK
    Posts
    3,327

    Re: Get Event

    Actually scrub that - I guess thats blank because autocomplete won't list the event?

    Does autocomplete list all the other web-browser events?
    Last edited by keystone_paul; May 23rd, 2009 at 03:10 PM. Reason: spotted that the class inherits the webbrowser control

  4. #4

    Thread Starter
    Hyperactive Member Philly0494's Avatar
    Join Date
    Apr 2008
    Posts
    485

    Re: Get Event

    thanks, but that event is MyBase.NewWindow instead of Me.NewWindow

    and it works perfectly

    and yes, i was doing "Me.NewWindow" not just "Me."

    my fault there

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