|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
NewWindow event in WebBrowser - Migrating from VB 6.0 to 2005I have a small application that extends the webBrowser object. There is only a single form in this application, with the webBrowser inside. Among other things, I catch the NewWindow2 event. This is done so i could open a new instance of my browser when a user clicks on a button that calls the javascript window.open command (without doing it, a new internet explorer is opened). I migrated the project to Visual Studio 2005, .NET 2.0, but the migration process failed to supply an appropriate code. I saw samples for Visual Studio 2003 .NET 1.1, but it seems like there have been changes since. this is the VB 6.0 code: Private Sub brwWebBrowser_NewWindow2(ppDisp As Object, Cancel As Boolean) Dim newFrm As frmBrowser Set newFrm = New frmBrowser newFrm.brwWebBrowser.RegisterAsBrowser = True Set ppDisp = newFrm.brwWebBrowser.Object newFrm.Visible = True newFrm.Show End Sub thanks for your help Ehud,
You are referencing to an webbrowser as far as I know can that only be one. You can create two webbrowser forms by dragging the browser on it (that could in 2003) and open than that form in the way you did. I hope this helps, Cor Ehud,
What is the exact error you are getting during the migration? Show quoteHide quote "Ehud_A" <eh***@hotmail.co.il> wrote in message news:1142141995.429569.303580@u72g2000cwu.googlegroups.com... > Hi, > > I have a small application that extends the webBrowser object. There is > only a single form in this application, with the webBrowser inside. > Among other things, I catch the NewWindow2 event. This is done so i > could open a new instance of my browser when a user clicks on a button > that calls the javascript window.open command (without doing it, a new > internet explorer is opened). > > I migrated the project to Visual Studio 2005, .NET 2.0, but the > migration process failed to supply an appropriate code. > I saw samples for Visual Studio 2003 .NET 1.1, but it seems like there > have been changes since. > > this is the VB 6.0 code: > > Private Sub brwWebBrowser_NewWindow2(ppDisp As Object, Cancel As > Boolean) > > Dim newFrm As frmBrowser > Set newFrm = New frmBrowser > newFrm.brwWebBrowser.RegisterAsBrowser = True > > Set ppDisp = newFrm.brwWebBrowser.Object > > newFrm.Visible = True > newFrm.Show > > End Sub > > thanks for your help >
Need some help with vb StatusStrip Control
How to abort a WinForms apps with no main window [VB.NET] How to store/load XML schema internally... datagridview combo box Fields in Access database returned in alphabetical order ASP.NET, CSS, and Netscape 7.1 latency when loading forms Best way to implement 2 controls on one window Coding a TimeSpan Best value Help file builder |
|||||||||||||||||||||||