A Tough WebBrowser Problem
Posted on 2002-07-22
I am using Win98, IE6 and VB6.
I have a webbrowser on a form. I do not want a new window to open up, so this is what I did:
' ---------- Start code ------------
Dim WithEvents Web_VI As SHDocVwCtl.WebBrowser_V1
Private Sub Form_Load()
Set Web_VI = WebBrowser1.Object
Private Sub Web_VI_NewWindow(ByVal URL As String, ByVal Flags As Long, ByVal TargetFrameName As String, PostData As Variant, ByVal Headers As String, Processed As Boolean)
Processed = True
' --------- End code ----------------
Whenever a new window tries to open, it does not, and the current window opens to the URL that was supposed to be in the new window. Everything seems to work, except that after the Web_VI_NewWindow procedure, the form (along with textboxes) and the webbrowser cannot receive keyboard inputs!
What am I doing wrong? Please help!