﻿<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>StrataFrame Forum » StrataFrame Application Framework - V1 » WinForms (How do I?)  » How to access other form's methods and property from Main MDI parent</title><generator>InstantForum 2017-1 Final</generator><description>StrataFrame Forum</description><link>http://forum.strataframe.net/</link><webMaster>StrataFrame Forum</webMaster><lastBuildDate>Mon, 08 Jun 2026 22:55:24 GMT</lastBuildDate><ttl>20</ttl><item><title>How to access other form's methods and property from Main MDI parent</title><link>http://forum.strataframe.net/FindPost18274.aspx</link><description>Hi all,&lt;/P&gt;&lt;P&gt;I have an MDI parent form with some controls, I need to access another opened form's methods from the main form, but I don't know how.&amp;nbsp; I would need to test if that 2nd form is opened then call its methods and refresh it.&amp;nbsp; How can this be done?&amp;nbsp; &lt;/P&gt;&lt;P&gt;Please some sample code if possible.&lt;/P&gt;&lt;P&gt;Thanks!</description><pubDate>Sun, 03 Aug 2008 20:51:02 GMT</pubDate><dc:creator>Edhy Rijo</dc:creator></item><item><title>RE: How to access other form's methods and property from Main MDI parent</title><link>http://forum.strataframe.net/FindPost18289.aspx</link><description>Thanks Trent.</description><pubDate>Sun, 03 Aug 2008 20:51:02 GMT</pubDate><dc:creator>Edhy Rijo</dc:creator></item><item><title>RE: How to access other form's methods and property from Main MDI parent</title><link>http://forum.strataframe.net/FindPost18287.aspx</link><description>I wouldn't use the name but rather test on the type:&lt;/P&gt;&lt;P&gt;[codesnippet]If loForm.GetType() Is GetType(MyFormType) Then&lt;BR&gt;&amp;nbsp;&amp;nbsp; '---&lt;BR&gt;End If[/codesnippet]&lt;/P&gt;&lt;P&gt;But other than that, the MDIChildren should work fine.</description><pubDate>Sun, 03 Aug 2008 20:20:01 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item><item><title>RE: How to access other form's methods and property from Main MDI parent</title><link>http://forum.strataframe.net/FindPost18275.aspx</link><description>Humm, I found a way to access the 2nd form's methods like this:&lt;P&gt;[quote][codesnippet]&lt;FONT size=2&gt;&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#008000 size=2&gt;'-- Loop through all MDIChildren forms and when found the one we need,&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#008000 size=2&gt;'-- use CType() to get access to its custom public methods.&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;For&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Each&lt;/FONT&gt;&lt;FONT size=2&gt; loForm &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;As&lt;/FONT&gt;&lt;FONT size=2&gt; Form &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;In&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Me&lt;/FONT&gt;&lt;FONT size=2&gt;.MdiChildren&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; If&lt;/FONT&gt;&lt;FONT size=2&gt; loForm.Name = &lt;/FONT&gt;&lt;FONT color=#a31515 size=2&gt;"frmCallMonitor"&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Then&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; CType&lt;/FONT&gt;&lt;FONT size=2&gt;(loForm, frmCallMonitor).CheckUncheckCallsInList()&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ' This is a Public custom method in that form.&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Exit&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;For&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; End&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;If&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Next&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;[/codesnippet][/quote]&lt;/P&gt;&lt;P&gt;So far this work, but I am not sure if there is a better way than looping all the MdiChildren collection.</description><pubDate>Sat, 02 Aug 2008 14:29:31 GMT</pubDate><dc:creator>Edhy Rijo</dc:creator></item></channel></rss>