I have a Form1 as the main application and
Dim dialog = Snap.UI.Selection.SelectObject("")
is open. Sometimes, I forget to close the
first but the Form1 first. And I get this error message, the NX is forced to close. How can I deal with this?
Solved! Go to Solution.
I have a solution for this one
1. I added code to disable the close "X" on the Form1
Private Const CP_NOCLOSE_BUTTON As Integer = &H200 Protected Overloads Overrides ReadOnly Property CreateParams() As CreateParams Get Dim myCp As CreateParams = MyBase.CreateParams myCp.ClassStyle = myCp.ClassStyle Or CP_NOCLOSE_BUTTON Return myCp End Get End Property
2. Then I added an Exit Button
3. In the code for open dialog
'Begin Code btExit.Enable = False 'End Code btExit.Enable = True
This force the user to close the dialog