CodePudding user response:
Want to see you is how to control closed?FormB "closed", refers to the release of the Form object or remove pagecontrol page? Or is it just hide? Or call the Close? .
In addition, the "how to save in formA reminder or cancel the data in the fromB?"
- from the single responsibility principle consideration, this matter, should be handled by FormB: in "closed", namely to make prompt, trigger to FormA FormB and control way of "closed"
CodePudding user response:
When the data is modified, set a variable to ON, and in FormB CloseQuery events, and judge the value of the variable, when ON, shows that value have change, according to the need, if it closed, set canClose=true if you do not save, is set canClose=falseCodePudding user response: