<?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: Raise a click event on a form from another form</title><link>https://www.infopathdev.com:443/forums/thread/14721.aspx</link><pubDate>Tue, 18 Jul 2006 17:43:20 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:14721</guid><dc:creator>amerrill</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/14721.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=14721</wfw:commentRss><description>Thanks Matt..that's a great idea. I think it would definately work if I move all the declarative steps associated  with the button click into a common function and then follow your recommendation.&lt;br /&gt;&lt;br /&gt;FYI..I did see an example (in P. Halstead's book: page 165) of calling a method in a remote form by getting an object reference to the remote form's Extention property and calling InvokeMethod().  This requires full trust.&lt;br /&gt;&lt;br /&gt;Thanks again!</description></item><item><title>Re: Raise a click event on a form from another form</title><link>https://www.infopathdev.com:443/forums/thread/14720.aspx</link><pubDate>Tue, 18 Jul 2006 17:11:45 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:14720</guid><dc:creator>Matt Faus</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/14720.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=14720</wfw:commentRss><description>Hm, I really don't think you will be able to do this. You can attach to the object model of the opened form, so I would suggest making an "invisible trigger field" with an OnAfterChange event attached to it. Then, from the calling form, change the value of this field (via the object model).  This should trigger the OnAfterChange, and then you can call whatever function your button calls.&lt;br /&gt;&lt;br /&gt;This is kind of hacky, but I think it should work.  Please let us know how it works out!</description></item><item><title>Raise a click event on a form from another form</title><link>https://www.infopathdev.com:443/forums/thread/12919.aspx</link><pubDate>Wed, 12 Jul 2006 15:13:34 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:12919</guid><dc:creator>amerrill</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/12919.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=12919</wfw:commentRss><description>Hi, I'm using C# and have a reference to an XDocument that I opened using NewFromSolutionWithData().  The new form contains a button that I would like to click (using code) from the calling form.  Is there a way to do this using C#?</description></item></channel></rss>