|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Closed event not getting called?another form, like this: dim f as new frmWhatever f.someprop = somevalue f.showdialog() f.OkToClose = True f.close f = nothing On the dialog type form, I have a property called OkToClose. If the user closes the dialog form by using the control menu, then in the form.Closing event, I have this: if OkToClose = False then e.cancel = true me.hide exit sub end if So, the form doesn't get Closed when the user "closes" it -- it gets Closed when my code on the parent form sets OkToClose = True and then calls f.Close. I have code in the frmWhatever.Close event, and it NEVER gets called, as far as I can tell. Is there a reason for this? Am I missing something? Matt Be sure that when you are done with the form, that you call it's
Dispose method. That is not automatically called when you close it, unlike a form shown with just the Show method.
Upgrading VB6 to .Net
Distributing VB 2005 projects AcroRd32.exe left open button in bold System.IO.Ports.SerialPort.GetPortNames return wrog names above CO Getting primary key from new record instered into one table using ADO.net Unit Testing and Test Cases Printing a bar code Retrieving a handle to a private delegate Detecting a dialog |
|||||||||||||||||||||||