Hello,
I'm building a forms application that loads our helpdesk software (Remedy) and watches for email addresses. It then turns the email address into an AD lookup and displays things like their username, account status, ect.
However, our remedy webapplication opens a few popups that need to keep the session state intact. I've done this using the newwindow3 event, however, when the popup closes, the original form fails to work correctly (buttons don't work, content isn't updated). If I don't catch the new window event, and allow it to open in ie (I have to log in), everything works like expected.
I've tried 2 different ways of handling it to no avail.
Method 1 in .net 4.0
[XCODE]
The app correctly captures the popup (all of them, but ill use a singular example of selecting your technician).
I select a technician in the displayed popup form, and hit "Save", this appear to be a javascript button which also closes the form.
After hitting the save button, focus is returned to the original Form. However, the assigned technican does not change, nor do any of the buttons on form work (except the ones that create popups).
I have the same problem with the following implimentation using the webbrowser control and the activeXinstance
[XCODE]
I'm building a forms application that loads our helpdesk software (Remedy) and watches for email addresses. It then turns the email address into an AD lookup and displays things like their username, account status, ect.
However, our remedy webapplication opens a few popups that need to keep the session state intact. I've done this using the newwindow3 event, however, when the popup closes, the original form fails to work correctly (buttons don't work, content isn't updated). If I don't catch the new window event, and allow it to open in ie (I have to log in), everything works like expected.
I've tried 2 different ways of handling it to no avail.
Method 1 in .net 4.0
[XCODE]
Private Sub AxWebBrowser1_NewWindow3(sender As Object, e As AxSHDocVw.DWebBrowserEvents2_NewWindow3Event) Handles AxWebBrowser1.NewWindow3 'Method 1 processed() Dim Ax2 As New AxSHDocVw.AxWebBrowser Dim f As New Form f.Controls.Add(Ax2) f.Show() e.ppDisp = Ax2.Application[/XCODE]
The app correctly captures the popup (all of them, but ill use a singular example of selecting your technician).
I select a technician in the displayed popup form, and hit "Save", this appear to be a javascript button which also closes the form.
After hitting the save button, focus is returned to the original Form. However, the assigned technican does not change, nor do any of the buttons on form work (except the ones that create popups).
I have the same problem with the following implimentation using the webbrowser control and the activeXinstance
[XCODE]
Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load WebBrowser1.Navigate("website") Dim activeXBrowser As SHDocVw.WebBrowser = CType(WebBrowser1.ActiveXInstance, SHDocVw.WebBrowser) AddHandler activeXBrowser.NewWindow3, AddressOf axBrowserNewWindow3 End Sub Private Sub axBrowserNewWindow3(ByRef ppDisp As Object, ByRef cancel As Boolean, dwflags As UInteger, bstrUrlContent As String, bstrUrl As String) Dim frm As New Form2 'MessageBox.Show(bstrUrl) frm.Show() ppDisp = CType(frm.WebBrowser1.ActiveXInstance, SHDocVw.WebBrowser).Application frm.Show() 'cancel = True End Sub[/XCODE]
Last edited: