﻿<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>StrataFrame Forum » StrataFrame Application Framework - V1 » WinForms (How do I?)  » Close form and ask for save</title><generator>InstantForum 2017-1 Final</generator><description>StrataFrame Forum</description><link>http://forum.strataframe.net/</link><webMaster>StrataFrame Forum</webMaster><lastBuildDate>Sat, 19 Sep 2026 18:07:16 GMT</lastBuildDate><ttl>20</ttl><item><title>RE: Close form and ask for save</title><link>http://forum.strataframe.net/FindPost11363.aspx</link><description>No problem.&amp;nbsp; All of the automation on the form can be both customized to show a different message or turned off completely.&amp;nbsp; You just have to fish around until you find the property that does what you want it to.&amp;nbsp; Sometimes the descriptions of the properties help, too (if you can see the description at the bottom of the property sheet, sometimes it's hidden).</description><pubDate>Thu, 06 Sep 2007 08:56:51 GMT</pubDate><dc:creator>StrataFrame Team</dc:creator></item><item><title>Close form and ask for save</title><link>http://forum.strataframe.net/FindPost8180.aspx</link><description>Hi,&lt;/P&gt;&lt;P&gt;Any built in method that I can call to close a form which will ask for save if datatable is dirty?&lt;/P&gt;&lt;P&gt;Thank you</description><pubDate>Thu, 06 Sep 2007 08:56:51 GMT</pubDate><dc:creator>Chan</dc:creator></item><item><title>RE: Close form and ask for save</title><link>http://forum.strataframe.net/FindPost11355.aspx</link><description>[quote][b]Trent L. Taylor (09/05/2007)[/b][hr][quote]where I can find this?&lt;br&gt;
[/quote]&lt;br&gt;
&lt;br&gt;
This is a property on the form. If you created a standard .NET form and are not using the SF Standard form or inheriting from the SF BaseForm, you will not have this property....and you will have some other problems down the road as it relates to "normal" functionality. If you select the form in the designer and go to the property sheet, you should see this property.&lt;br&gt;
&lt;br&gt;
[/quote]&lt;br&gt;
&lt;br&gt;
Sorry I not thinked that AutoAskSaveChanges = AutoShowSaveChangesMessage, I utilized AutoShowSaveChangesMessage on my tests but I supposed that AutoAskSaveChanges have another purpose or something else :w00t: woops&lt;br&gt;
&lt;br&gt;
again I have to say thanks for your great response and sorry for my mistake :)&lt;br&gt;
&lt;br&gt;
- Fabian&lt;br&gt;
&lt;br&gt;</description><pubDate>Wed, 05 Sep 2007 13:56:58 GMT</pubDate><dc:creator>Fabian R Silva, -</dc:creator></item><item><title>RE: Close form and ask for save</title><link>http://forum.strataframe.net/FindPost11340.aspx</link><description>[quote]where I can find this?&lt;BR&gt;[/quote]&lt;/P&gt;&lt;P&gt;This is a property on the form.&amp;nbsp; If you created a standard .NET form and are not using the SF Standard form or inheriting from the SF BaseForm, you will not have this property....and you will have some other problems down the road as it relates to "normal" functionality.&amp;nbsp; If you select the form in the designer and go to the property sheet, you should see this property.&lt;/P&gt;&lt;P&gt;&lt;IMG src="http://forum.strataframe.net/Uploads/Images/81811e9b-f2ee-43b2-9528-06aa.png"&gt;</description><pubDate>Wed, 05 Sep 2007 08:58:02 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item><item><title>RE: Close form and ask for save</title><link>http://forum.strataframe.net/FindPost11336.aspx</link><description>[quote][b]Greg McGuffey (09/04/2007)[/b][hr]Are you expecting the BO on the menu form to be dirty?  Did you manipulate it or the CurrentDataTable?  If so, you could just either save it or undo the changes, to save or loose those changes, programmatically.  Do this in the FormClosing event (I pretty sure :ermm: ).  &lt;br&gt;
&lt;br&gt;
Or you could just set the AutoAskSaveChanges property on the form to not prompt to save the changes. I'm guessing that it would either just always save or always undo or that you can set what it does if you don't ask to save changes.[/quote]&lt;br&gt;
&lt;br&gt;
You're right, I not see before that I edit the currentDataTable and add a new column next to the fill method on the business object :blush:&lt;br&gt;
&lt;br&gt;
Question:&lt;br&gt;
I can´t find the AutoAskSaveChanges property on the form, not in designer, not via "me.AutoAskSaveChanges = false", where I can find this?&lt;br&gt;
&lt;br&gt;
Thanks for you reply&lt;br&gt;
&lt;br&gt;
- Fabian</description><pubDate>Wed, 05 Sep 2007 07:13:50 GMT</pubDate><dc:creator>Fabian R Silva, -</dc:creator></item><item><title>RE: Close form and ask for save</title><link>http://forum.strataframe.net/FindPost11332.aspx</link><description>Are you expecting the BO on the menu form to be dirty?  Did you manipulate it or the CurrentDataTable?  If so, you could just either save it or undo the changes, to save or loose those changes, programmatically.  Do this in the FormClosing event (I pretty sure :ermm: ).  &lt;br&gt;
&lt;br&gt;
Or you could just set the AutoAskSaveChanges property on the form to not prompt to save the changes. I'm guessing that it would either just always save or always undo or that you can set what it does if you don't ask to save changes.</description><pubDate>Tue, 04 Sep 2007 16:13:39 GMT</pubDate><dc:creator>Greg McGuffey</dc:creator></item><item><title>RE: Close form and ask for save</title><link>http://forum.strataframe.net/FindPost11331.aspx</link><description>Note about the last post: I only fill a Business object (but not edit any property of them... only filter it sometimes) and fill a treeview with that data&lt;br&gt;
&lt;br&gt;
I set on the form:&lt;br&gt;
Me.myBO1.IncludeInFormSave = False&lt;br&gt;
Me.IncludeInFormSaveType = MicroFour.StrataFrame.Business.IncludeInFormTypeOptions.DeterminedByBusinessObject&lt;br&gt;
&lt;br&gt;
if I set &lt;br&gt;
Me.AutoShowSaveChangesMessage = False or me.myBo1.clear() and close the form, this not say if I like to save&lt;br&gt;
&lt;br&gt;
me.MenuesBO1.IsDirty = true when I test it after the fill method&lt;br&gt;
&lt;br&gt;
What I made wrong? thanks!&lt;br&gt;</description><pubDate>Tue, 04 Sep 2007 16:10:43 GMT</pubDate><dc:creator>Fabian R Silva, -</dc:creator></item><item><title>RE: Close form and ask for save</title><link>http://forum.strataframe.net/FindPost11329.aspx</link><description>[quote][b]Trent L. Taylor (04/17/2007)[/b][hr]The StrataFrame baseform already does this when a BO which is dropped on this form is dirty. By default this functionality already exists. You have to set the forms AutoAskSaveChanges property to False to prevent this type of functionality.[/quote]&lt;br&gt;
&lt;br&gt;
I have a "menu" form (it have a Business object to populate a treeview) &lt;br&gt;
When I close the applicaction, it show the save dialog can I avoid this to happen on that form? thanks!</description><pubDate>Tue, 04 Sep 2007 15:23:50 GMT</pubDate><dc:creator>Fabian R Silva, -</dc:creator></item><item><title>RE: Close form and ask for save</title><link>http://forum.strataframe.net/FindPost8286.aspx</link><description>You could if you iterate through all of the forms and add a handler that references a single method:&lt;/P&gt;&lt;P&gt;[codesnippet]Dim loForm As Form&lt;/P&gt;&lt;P&gt;For Each loForm In MyFormsCollection&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; AddHandler loForm.FormClosing, Addressof YourFormClosingMethod&lt;BR&gt;Next[/codesnippet]&lt;/P&gt;&lt;P&gt;You could then place your code in the "YourFormClosingMethod" to check on whatever you needed.</description><pubDate>Thu, 19 Apr 2007 11:24:32 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item><item><title>RE: Close form and ask for save</title><link>http://forum.strataframe.net/FindPost8283.aspx</link><description>Hi,&lt;/P&gt;&lt;P&gt;What I am doing&amp;nbsp;is to interate all forms, close them and launch connection dialog. Therefore, i couldn't handle formclosing event.</description><pubDate>Thu, 19 Apr 2007 10:34:05 GMT</pubDate><dc:creator>Chan</dc:creator></item><item><title>RE: Close form and ask for save</title><link>http://forum.strataframe.net/FindPost8279.aspx</link><description>Handle the FormClosed event.&amp;nbsp; This want you know for sure that the form has been closed.</description><pubDate>Thu, 19 Apr 2007 10:25:28 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item><item><title>RE: Close form and ask for save</title><link>http://forum.strataframe.net/FindPost8272.aspx</link><description>Hi.&lt;/P&gt;&lt;P&gt;How could I know the form is really closed? User may select "cancel" in ask for save dialog.&lt;/P&gt;&lt;P&gt;Thank you</description><pubDate>Thu, 19 Apr 2007 10:06:59 GMT</pubDate><dc:creator>Chan</dc:creator></item><item><title>RE: Close form and ask for save</title><link>http://forum.strataframe.net/FindPost8260.aspx</link><description>This is handled in the FOrmClosing event of the form, so anything that logically attempts to close the form should trigger the message.&amp;nbsp; For example:&lt;/P&gt;&lt;P&gt;[codesnippet]Me.Close()[/codesnippet]</description><pubDate>Wed, 18 Apr 2007 22:17:06 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item><item><title>RE: Close form and ask for save</title><link>http://forum.strataframe.net/FindPost8255.aspx</link><description>Hi,&lt;/P&gt;&lt;P&gt;I have set the "AutoAskSaveChanges" property to true. It works when I close the form interactively. How could to have the same "behavor" if I want to close the form programmatically? Currently, I tried to form.Dispose(), the form just released without and prompt.&lt;/P&gt;&lt;P&gt;Please advice&lt;/P&gt;&lt;P&gt;Thank you</description><pubDate>Wed, 18 Apr 2007 20:07:22 GMT</pubDate><dc:creator>Chan</dc:creator></item><item><title>RE: Close form and ask for save</title><link>http://forum.strataframe.net/FindPost8186.aspx</link><description>The StrataFrame baseform already does this when a BO which is dropped on this form is dirty.&amp;nbsp; By default this functionality already exists.&amp;nbsp; You have to set the forms AutoAskSaveChanges property to False to prevent this type of functionality.</description><pubDate>Tue, 17 Apr 2007 11:29:14 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item></channel></rss>