[Gambas-user] Me.Close in a multi-form application
vikram
austinium at ...43...
Wed Aug 11 08:53:42 CEST 2010
hi,
i have a multiform application, on the Close event of each form a confirmation dialog is displayed.
The user clicks a button on each form to move to the next one(or clicks a button to go back to the previous form), when he/she does this the current form's Visible property is set to false and that of the desired form is set to true.
When the user exits the application, Me.Close would only close the current form and all previous forms would remain in memory. I remember reading from the documentation that QUIT should not be used in GUI applications. If i close all previously opened forms by using FormName.Close each form's confirmation dialog pops up.
I've been thinking of way out of this, the only idea i've been able to come up with is that if there is a way a function could tell who called it, i could use that to prevent the confirmation dialogs from being displayed on form close.
Say user closes Form C, now Forms A & B are have their Visible property set to False so they are hidden. On the Close event of Form C i call Form A,B & C's Close method. If Form A & B's Close method could tell that they've been called from another form, then maybe i could prevent the confirmation dialogs from popping up. Or could there be some other way to do this?
I have a attached a sample application which illustrates the problem.
Thanks in advance :)
Vikram Shankar Nair
-------------- next part --------------
A non-text attachment was scrubbed...
Name: multiformClose.tar.gz
Type: application/x-gzip
Size: 9028 bytes
Desc: not available
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20100810/cb2dcfdd/attachment.bin>
More information about the User
mailing list