<?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>Code</title><link>https://www.infopathdev.com:443/forums/45.aspx</link><description /><dc:language>en</dc:language><generator>CommunityServer 2007 SP3 (Build: 31118.962)</generator><item><title>Re: C# How to display a message box?</title><link>https://www.infopathdev.com:443/forums/thread/45263.aspx</link><pubDate>Fri, 31 Jul 2009 15:50:13 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:45263</guid><dc:creator>krazykarter</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/45263.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=45263</wfw:commentRss><description>&lt;p&gt;That worked, thanks.&lt;/p&gt;</description></item><item><title>Re: C# How to display a message box?</title><link>https://www.infopathdev.com:443/forums/thread/45259.aspx</link><pubDate>Fri, 31 Jul 2009 15:46:35 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:45259</guid><dc:creator>Jimmy</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/45259.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=45259</wfw:commentRss><description>&lt;p&gt;&amp;nbsp;I&amp;#39;m not that well-versed on saving and closing from code, but for number 1, if you&amp;#39;re using the 2007 object model, it&amp;#39;s &lt;b&gt;MessageBox.Show(...)&lt;/b&gt;, just like any Windows Forms app.&amp;nbsp; In the 2003 object model, it would be &lt;b&gt;thisXDocument.UI.Alert(...)&lt;/b&gt;&lt;br /&gt;&lt;/p&gt;</description></item><item><title>C# How to display a message box?</title><link>https://www.infopathdev.com:443/forums/thread/45246.aspx</link><pubDate>Fri, 31 Jul 2009 15:25:10 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:45246</guid><dc:creator>krazykarter</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/45246.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=45246</wfw:commentRss><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;&amp;nbsp;Two parter, first part is a question that I would like some help with, and the second part is just some advice. I am using C# for the form code.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;1. Is there a way to display a message dialogue box? I am using code to save the form. Since rules are run before the code, I do not want to use a rule to display the message (saying &amp;quot;save successful&amp;quot;, or something similar) before the save actually takes place. Any suggestions?&lt;/p&gt;
&lt;p&gt;2. To save the form I am using the &amp;quot;this.Save();&amp;quot; command (the form has already been submitted at this point), and to close the form I am using &amp;quot;Application.Quit();&amp;quot; (I used &amp;quot;this.Close();&amp;quot; but that still left infopath open after closing the form. I want to close infopath completely). Are there any better ways to do this using code?&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Thanks in advance.&lt;/p&gt;</description></item></channel></rss>