MustInherit Class Program …
<WebMethod>
Public Function HitFormBackButtonIfPossible() As Boolean
Dim intMax As Integer = Application.OpenForms.Count
Dim intCurrentForm As Form = Application.OpenForms(intMax – 1)
intCurrentForm.DialogResult = DialogResult.Cancel
intCurrentForm.Close()
Return True
End Function
in the Chrome console, typing App.HitFormBackButtonIfPossible() shows up in autocomplete, but trying to invoke it does this:
VM1543:1 Uncaught TypeError: App.HitFormBackButtonIfPossible is not a function
at <anonymous>:1:5
Oops. I had to make it a Public Shared Function (static).
Please login first to submit.