<?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: How to close a form?</title><link>https://www.infopathdev.com:443/forums/thread/6527.aspx</link><pubDate>Sun, 27 Mar 2005 22:58:21 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:6527</guid><dc:creator>Shanthi Reddy</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/6527.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=6527</wfw:commentRss><description>You can use something like this is your custom code right before closing the window.&lt;br /&gt;&lt;br /&gt;DAVAdapter oSharePoint	= (DAVAdapter)thisXDocument.DataAdapters["SharepointSubmit"];&lt;br /&gt;oSharePoint.FileName	= sSharePointFileName;&lt;br /&gt;&lt;br /&gt;Shanthi&lt;br /&gt;InfoPathDev India</description></item><item><title>Re: How to close a form?</title><link>https://www.infopathdev.com:443/forums/thread/6526.aspx</link><pubDate>Fri, 18 Mar 2005 01:26:09 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:6526</guid><dc:creator>potpourri</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/6526.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=6526</wfw:commentRss><description>i saw this tips and used it for my own "Close Form" button that will both save the entries and close the form using custom code.&lt;br /&gt;&lt;br /&gt;(onClick event)&lt;br /&gt;XDocument.View.Window.Close(false);&lt;br /&gt;&lt;br /&gt;my question is, can we specify a custom filename to save when this event occurs? (by default it will be saved as "Form&amp;lt;number&amp;gt;" in my sharepoint library.</description></item><item><title>Re: How to close a form?</title><link>https://www.infopathdev.com:443/forums/thread/6525.aspx</link><pubDate>Wed, 09 Mar 2005 08:34:53 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:6525</guid><dc:creator>Patrick Halstead</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/6525.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=6525</wfw:commentRss><description>Try using an OnClick event handler and see if that works. Not sure why OnAfterChange wouldn't work, but it's possible it's because the DOM hasn't been updated.</description></item><item><title>Re: How to close a form?</title><link>https://www.infopathdev.com:443/forums/thread/6524.aspx</link><pubDate>Wed, 02 Mar 2005 06:08:55 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:6524</guid><dc:creator>liorlankri</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/6524.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=6524</wfw:commentRss><description>I tried it but I get this Error massege:&lt;br /&gt;&lt;br /&gt;System.Runtime.InteropServices.COMException&lt;br /&gt;Invalid context for OM call.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;What is the problem? Can I close a form in OnAfterChange event?</description></item><item><title>Re: How to close a form?</title><link>https://www.infopathdev.com:443/forums/thread/6523.aspx</link><pubDate>Tue, 01 Mar 2005 17:28:26 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:6523</guid><dc:creator>Greg Collins</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/6523.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=6523</wfw:commentRss><description>You would use:&lt;br /&gt;&lt;br /&gt;thisXDocument.View.Window.Close(true);&lt;br /&gt;&lt;br /&gt;Boolean Parameter:&lt;br /&gt;true = don't show a dialog box asking if the user wants to close.&lt;br /&gt;false = show the dialog box.&lt;br /&gt;&lt;br /&gt;Greg Collins [InfoPath MVP]</description></item><item><title>How to close a form?</title><link>https://www.infopathdev.com:443/forums/thread/4564.aspx</link><pubDate>Tue, 01 Mar 2005 09:06:57 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:4564</guid><dc:creator>liorlankri</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/4564.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=4564</wfw:commentRss><description>I have an InfoPath form (.NET infoPath project) that contain a field that contain OnAfterChange(DataDOMEvent e) event. &lt;br /&gt;I this function I have a Confirm massege (In C#): &lt;br /&gt;&lt;br /&gt; if (this.thisXDocument.UI.Confirm("bla bla", XdConfirmButtons.xdOKCancel) == XdConfirmChoice.xdCancel )&lt;br /&gt;&lt;br /&gt;I want that click on Cancel will close the form!!!!&lt;br /&gt;How to to it??</description></item></channel></rss>