M
Matt
Hi all.. Something strange with something that should be simple.
Have a form with a button that calls another form (showdialog)
--
10 Dim f As New frmTrainRecMaint(frmTrainRecMaint.enmFormAction.AddNew)
20 f.ShowDialog()
30 If f.dialogResult = DialogResult.OK Then
40 SetupDG()
50 End If
--
frmForm has a cancel button, under the click event I have:
--
5 Private Sub btnCancel_Click (...)
10 If ChangesMade = True Then
20 If MessageBox.Show("Changes made, cancel?", "Verify Cancel",
MessageBoxButtons.YesNo, MessageBoxIcon.Question) = DialogResult.Yes Then
30 Me.DialogResult = DialogResult.Cancel
40 Me.Dispose()
50 End If
60 End If
70 End Sub
--
tracking it, everything works great, but when it gets to the end of the
click event, 70,
the run jumps back to the parent form and continues with 30.
frmForm dissapears. It never runs the me.dispose, so where'd it go!?!?
Help! Thanks,
Matt
Have a form with a button that calls another form (showdialog)
--
10 Dim f As New frmTrainRecMaint(frmTrainRecMaint.enmFormAction.AddNew)
20 f.ShowDialog()
30 If f.dialogResult = DialogResult.OK Then
40 SetupDG()
50 End If
--
frmForm has a cancel button, under the click event I have:
--
5 Private Sub btnCancel_Click (...)
10 If ChangesMade = True Then
20 If MessageBox.Show("Changes made, cancel?", "Verify Cancel",
MessageBoxButtons.YesNo, MessageBoxIcon.Question) = DialogResult.Yes Then
30 Me.DialogResult = DialogResult.Cancel
40 Me.Dispose()
50 End If
60 End If
70 End Sub
--
tracking it, everything works great, but when it gets to the end of the
click event, 70,
the run jumps back to the parent form and continues with 30.
frmForm dissapears. It never runs the me.dispose, so where'd it go!?!?
Help! Thanks,
Matt