Hello all,
I have several pages in my app. All pages perform in the same manner but one does not work. This is the norm:
In a button on the page that is being left (other than Main Page).
self.Visible = False
frmMain.Show
Session.KillMe("frmManageUserInterfaces")
In Session this code exists:
Dim i As Integer
Dim n As Integer
Dim P As Integer
Dim Pg as String
p = session.PageCount -1
for i = p DownTo 0 Step 1
n = session.PageCount
Pg = Me.PageAtIndex(i).Name
if Me.PageAtIndex(i).Name = PageToKill Then
Me.PageAtIndex(i).close
p = session.PageCount
Exit For
end if
next
frmMain.fldPageCount.Text = "Page Count = " + cstr(Session.PageCount)
Return
ALL of the other pages are killed except for this one - frmManageUserInterfaces. Stepping through the code reveals that during the For-Next loop, the page IS found, and the code Me.PageAtIndex(i).close is executed (within the for-next). But the page remains, at least in the Session.PageCount. On exit from the application, the page does appear to be killed since it appears, at least in debug mode, that all pages are killed and the app is fully removed from memory.
Has anyone had similar experiences, or suggest what may be the problem? There is nothing special on this page - nothing different from the other pages that is…
Thanks all,
Tim