In this line of code in my VB.NET Aplplication
[code]
If pEnvmnt = "rel6" Then
aa_vb_interface.OpenWindow("http://BLAH1/Controller?view=jsp/Pportal.jsp", pTitle, pUserName, pPassword, True)
End If
[\code]
it calls this
Now it places objDoc and MIEObj as null but when I check the definition of both they point me to the class AA_Library I have in my project where Public WithEvents mIEObj As SHDocVw.InternetExplorer and Dim objDoc As mshtml.HTMLDocument
so why do they both report null values do both need to be initialized as something ? Please help. Thanks.
[code]
If pEnvmnt = "rel6" Then
aa_vb_interface.OpenWindow("http://BLAH1/Controller?view=jsp/Pportal.jsp", pTitle, pUserName, pPassword, True)
End If
[\code]
it calls this
Code:
Public Sub OpenWindow(ByVal prmURL As Object, ByVal prmTitle As String, Optional ByVal prmUserName As String = "", _
Optional ByVal prmPassword As String = "", Optional ByVal blnIsVisible As Boolean = True)
On Error GoTo Errhandler
Dim objDoc As mshtml.HTMLDocument
Dim objTempDoc As mshtml.HTMLDocument
mIEObj = AA_Lib_Module.GetAmWindow(prmTitle)
If mIEObj Is Nothing Then mIEObj = AA_Lib_Module.GetAmWindow("AM Adv Login")
'Set objTempDoc = GetWindowDocument(prmTitle)
If InStr(prmTitle, "None") Then prmTitle = "A Adv"
If Not mIEObj Is Nothing Then
mIEObj.PutProperty("MyProperty", prmTitle)
mIEObj.Navigate2(prmURL)
Call Amisys_doEvents()
objTempDoc = mIEObj.Document
End If
If objTempDoc Is Nothing Then
If Not blnIsVisible Then
If mIEObj Is Nothing Then mIEObj = CreateObject("internetexplorer.application")
' Create Object for InternetExplorer
mIEObj.Visible = blnIsVisible
'InternetExplorer Object to visible
' InternetExplorer Object to Silent
mIEObj.Navigate(prmURL)
mIEObj.PutProperty("MyProperty", prmTitle)
Else
mIEObj = AA_Lib_Module.StartNewBrowser(prmURL)
mIEObj.PutProperty("MyProperty", prmTitle)
End If
Call Amisys_doEvents()
objDoc = mIEObj.Document
Else
objDoc = objTempDoc
End If
mIEObj.Silent = True
AA_Instance = mIEObj
Dim title As String = prmTitle
SetAppTitle()
Dim UserName As String = prmUserName
Dim Password As String = prmPassword
Dim SessionURL As String = GetSessionURL(prmURL)
Exit Sub
Errhandler:
mLibMessage = " Error Instantiating the Application. Please try again "
End Sub
so why do they both report null values do both need to be initialized as something ? Please help. Thanks.