by Nitin Gupta (2 Submissions)
Category: Coding Standards
Compatability: Visual Basic 3.0
Difficulty: Intermediate
Date Added: Wed 3rd February 2021
Rating: (10 Votes)
I have observed that many browsers are coming up, but none supports the same format when a new window is opened, simply because they use IE control. Here's a code for guys who want to create forms at Runtime (Copy their previous forms onto new ones). Plz vote if u use it !!
For normal coders :
Dim frmCopy As Form1
Set frmCopy = New Form1
frmCopy.Visible = True
For WebBrowser developers :
Private Sub WebBrowser1_NewWindow2(ppDisp As Object, Cancel As Boolean)
Dim frmNew As Form1
Set frmNew = New Form1
frmNew.WebBrowser1.RegisterAsBrowser = True
Set ppDisp = frmNew.WebBrowser1.Object
frmNew.Visible = True
End Sub