I'm using the webbrowser control to login to this forum, but I'd like to detect or suppress the "You have a new private message" dialog window from showing,....
Image may be NSFW.
Clik here to view.
This is hard for me to test since if I send a private message to myself it seems the dialog doesn't show up, so... Does anyone know if the code below will block these dialog windows?
Otherwise, maybe you can send me a private message so I can do some testing :), Thanks!
BTW, I know one way to close the dialog but it requires a timer and some API, hoping to avoid that!
Image may be NSFW.
Clik here to view.

This is hard for me to test since if I send a private message to myself it seems the dialog doesn't show up, so... Does anyone know if the code below will block these dialog windows?
Code:
Private Sub WebBrowser1_NewWindow(sender As Object, e As System.ComponentModel.CancelEventArgs) Handles WebBrowser1.NewWindow
' will this block "You have a new private message" dialogs also?
e.Cancel = True
End Sub
Otherwise, maybe you can send me a private message so I can do some testing :), Thanks!
BTW, I know one way to close the dialog but it requires a timer and some API, hoping to avoid that!