<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://www.infopathdev.com:443/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>General</title><link>https://www.infopathdev.com:443/forums/41.aspx</link><description>If you're not sure where to ask your question, ask it here. If necessary, our moderators will make sure it gets classified in the correct board.</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP3 (Build: 31118.962)</generator><item><title>Re: Prompt to save changes on close</title><link>https://www.infopathdev.com:443/forums/thread/8122.aspx</link><pubDate>Thu, 27 Oct 2005 23:46:17 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:8122</guid><dc:creator>franck</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/8122.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=8122</wfw:commentRss><description>Hi,&lt;br /&gt;&lt;br /&gt;There is no On_Form_close event in InfoPath.  Therefore, you can force your user to use a close button on your form.  In there, you can check the thisApplication.ActiveWindow.XDocument.IsDirty flag to see if anything needs to be saved.  Next, you can use System.Windows.Forms.DialogResult to display a customized message box.  Based on the answer from your user, you can proceed and Save or Close the form without saving.&lt;br /&gt;&lt;br /&gt;Does it make sense?&lt;br /&gt;&lt;br /&gt;Regards,&lt;br /&gt;&lt;br /&gt;Franck Dauché</description></item><item><title>Prompt to save changes on close</title><link>https://www.infopathdev.com:443/forums/thread/5060.aspx</link><pubDate>Thu, 27 Oct 2005 21:08:30 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:5060</guid><dc:creator>absMing</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/5060.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=5060</wfw:commentRss><description>Hi&lt;br /&gt;&lt;br /&gt;Is there an easy way of prompting the user on_form_close whether they have unsaved data on the form?  If not, can i borrow someone's code to do this.&lt;br /&gt;&lt;br /&gt;Regards</description></item></channel></rss>