<?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: Infopath avoid method on form load</title><link>https://www.infopathdev.com:443/forums/thread/95324.aspx</link><pubDate>Mon, 20 Jan 2014 15:47:30 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:95324</guid><dc:creator>renatois</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/95324.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=95324</wfw:commentRss><description>I am trying not to enter the method drpChantier_Changed when I load the form, I would like to enter the method only when the dropdown is changed.

I tried to remove the method from the InternalStartup so it doenst load when the form starts, but it also stopped loading when the dropdown is changed.

        public void InternalStartup()
        {
            EventManager.FormEvents.Loading += new LoadingEventHandler(FormEvents_Loading);
            //EventManager.XmlEvents[&amp;quot;/my:mesChamps/my:SecCartouche/my:drpChantier&amp;quot;].Changed += new XmlChangedEventHandler(drpChantier_Changed);
........................

Thanks</description></item><item><title>Re: Infopath avoid method on form load</title><link>https://www.infopathdev.com:443/forums/thread/95323.aspx</link><pubDate>Mon, 20 Jan 2014 15:42:00 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:95323</guid><dc:creator>Jimmy</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/95323.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=95323</wfw:commentRss><description>&lt;p&gt;&amp;nbsp;You haven&amp;#39;t given us much information here, but the drpChantier_Changed event will fire any time the associated field&amp;#39;s value changes. What is it that you are trying to avoid, exactly?&lt;/p&gt;</description></item><item><title>Infopath avoid method on form load</title><link>https://www.infopathdev.com:443/forums/thread/95319.aspx</link><pubDate>Mon, 20 Jan 2014 08:43:37 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:95319</guid><dc:creator>renatois</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/95319.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=95319</wfw:commentRss><description>&lt;p&gt;Hi, when I simply open a form it loads the FormEvents_Loading but also loads the method of the DropDown change (public void drpChantier_Changed(object sender, XmlEventArgs e)). So it goes to FormEvents_Loading and also drpChantier_Changed. How can I avoid that?&lt;/p&gt;&lt;pre class="prettyprint prettyprinted"&gt;&lt;span class="pln"&gt;        &lt;/span&gt;&lt;span class="kwd"&gt;public&lt;/span&gt;&lt;span class="pln"&gt; &lt;/span&gt;&lt;span class="kwd"&gt;void&lt;/span&gt;&lt;span class="pln"&gt; &lt;/span&gt;&lt;span class="typ"&gt;FormEvents_Loading&lt;/span&gt;&lt;span class="pun"&gt;(&lt;/span&gt;&lt;span class="kwd"&gt;object&lt;/span&gt;&lt;span class="pln"&gt; sender&lt;/span&gt;&lt;span class="pun"&gt;,&lt;/span&gt;&lt;span class="pln"&gt; &lt;/span&gt;&lt;span class="typ"&gt;LoadingEventArgs&lt;/span&gt;&lt;span class="pln"&gt; e&lt;/span&gt;&lt;span class="pun"&gt;)&lt;/span&gt;&lt;span class="pln"&gt;
        &lt;/span&gt;&lt;span class="pun"&gt;{&lt;/span&gt;&lt;span class="pln"&gt;
            &lt;/span&gt;&lt;span class="kwd"&gt;try&lt;/span&gt;&lt;span class="pln"&gt;
            &lt;/span&gt;&lt;span class="pun"&gt;{&lt;/span&gt;&lt;span class="pln"&gt;
&lt;/span&gt;&lt;span class="pun"&gt;...............&lt;/span&gt;&lt;span class="pln"&gt;
            &lt;/span&gt;&lt;span class="pun"&gt;}&lt;/span&gt;&lt;span class="pln"&gt;
        &lt;/span&gt;&lt;span class="pun"&gt;}&lt;/span&gt;&lt;span class="pln"&gt;

        &lt;/span&gt;&lt;span class="kwd"&gt;public&lt;/span&gt;&lt;span class="pln"&gt; &lt;/span&gt;&lt;span class="kwd"&gt;void&lt;/span&gt;&lt;span class="pln"&gt; drpChantier_Changed&lt;/span&gt;&lt;span class="pun"&gt;(&lt;/span&gt;&lt;span class="kwd"&gt;object&lt;/span&gt;&lt;span class="pln"&gt; sender&lt;/span&gt;&lt;span class="pun"&gt;,&lt;/span&gt;&lt;span class="pln"&gt; &lt;/span&gt;&lt;span class="typ"&gt;XmlEventArgs&lt;/span&gt;&lt;span class="pln"&gt; e&lt;/span&gt;&lt;span class="pun"&gt;)&lt;/span&gt;&lt;span class="pln"&gt;
        &lt;/span&gt;&lt;span class="pun"&gt;{&lt;/span&gt;&lt;span class="pln"&gt;
            &lt;/span&gt;&lt;span class="kwd"&gt;try&lt;/span&gt;&lt;span class="pln"&gt;
            &lt;/span&gt;&lt;span class="pun"&gt;{&lt;/span&gt;&lt;span class="pln"&gt;
&lt;/span&gt;&lt;span class="pun"&gt;...............&lt;/span&gt;&lt;span class="pln"&gt;
            &lt;/span&gt;&lt;span class="pun"&gt;}&lt;/span&gt;&lt;span class="pln"&gt;
        &lt;/span&gt;&lt;span class="pun"&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;p&gt;thanks&lt;/p&gt;&lt;br /&gt;</description></item></channel></rss>