Function MenuPreferences() As Boolean
If winPrefs = Nil Then
winPrefs = New winPreferences // is invisible
End If
winPrefs.Show
Return True
End Function
If I show and close the Preferences window then I can’t get it back - it isn’t Nil but it isn’t showing in the debugger either …
Once you “close” a window you should drop references to it
So either make WinPrefs a weakRef
Or override winPrefs.CancelClose to just hide the window and return true
Yeah I know not intuitive at all
CancelClose will need to be something like
If appquitting the
Return False
End If
Me.hide
Return True