﻿<?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?)  » Passing in Params into ChildFormDialog control</title><generator>InstantForum 2017-1 Final</generator><description>StrataFrame Forum</description><link>http://forum.strataframe.net/</link><webMaster>StrataFrame Forum</webMaster><lastBuildDate>Tue, 09 Jun 2026 12:44:12 GMT</lastBuildDate><ttl>20</ttl><item><title>Passing in Params into ChildFormDialog control</title><link>http://forum.strataframe.net/FindPost21120.aspx</link><description>Hello,&lt;br&gt;
I have a form with a ChildFormDialog control on it, ChildFormDialog is mapped to another form and BO Translation setup. Everything works great, but I need to be able to pass in some params into the Child Dialog form.&lt;br&gt;
I see that one of the overload methods of .ShowDialog(); takes in a params array. But I can't figure out how to catch them in the Child Form. &lt;br&gt;
Can someone advise here.&lt;br&gt;
Thanks.</description><pubDate>Thu, 11 Dec 2008 12:13:49 GMT</pubDate><dc:creator>Leonard P.</dc:creator></item><item><title>RE: Passing in Params into ChildFormDialog control</title><link>http://forum.strataframe.net/FindPost21132.aspx</link><description>Yeah it worked. Thanks everyone.</description><pubDate>Thu, 11 Dec 2008 12:13:49 GMT</pubDate><dc:creator>Leonard P.</dc:creator></item><item><title>RE: Passing in Params into ChildFormDialog control</title><link>http://forum.strataframe.net/FindPost21128.aspx</link><description>All good suggestions.&amp;nbsp; It is just a matter of defining the parameters on your child form just as though you would be calling it directly.&amp;nbsp; Once this has been done, just provide all of the parameters in the ChildForm.ShowDialog in the order in which the constructor is expecting them.&amp;nbsp; That is basically it.&amp;nbsp; Let me know if you don't make any progress.</description><pubDate>Thu, 11 Dec 2008 09:52:42 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item><item><title>RE: Passing in Params into ChildFormDialog control</title><link>http://forum.strataframe.net/FindPost21123.aspx</link><description>Hey Leonard&lt;/P&gt;&lt;P&gt;In your main form when you call the child form set up a parameter to pass.&lt;/P&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#0000ff size=2&gt;&lt;P&gt;Private&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color=#000000 size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#0000ff size=2&gt;Sub&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;FONT color=#000000&gt; AddRecordCode()&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;Dim LocSiteID As Integer&lt;/P&gt;&lt;P&gt;LocSiteID = Whatever&lt;/P&gt;&lt;P&gt;Call BO.Edit&lt;/P&gt;&lt;P&gt;&amp;nbsp;If Me.Childform.ShowDialog(LocSiteID) = Windows.Forms.DialogResult.OK Then&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; '-- Refresh the Grid&lt;BR&gt;Else&lt;/P&gt;&lt;/FONT&gt;&lt;P&gt;End Sub&lt;/P&gt;&lt;P&gt;-----------------------------------------------------------&lt;BR&gt;Your Childform&amp;nbsp;can get the parameter&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR&gt;Pass&amp;nbsp;the parameter&amp;nbsp;through the form&lt;/P&gt;&lt;P&gt;Public Sub New(ByVal LocSiteID As Integer)&lt;/P&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#0000ff size=2&gt;&lt;P&gt;Your Param = LocSiteID&lt;/P&gt;&lt;P&gt;End&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color=#000000 size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#0000ff size=2&gt;Class&lt;/P&gt;&lt;/FONT&gt;&lt;/FONT&gt;</description><pubDate>Wed, 10 Dec 2008 18:54:28 GMT</pubDate><dc:creator>Michael Reese</dc:creator></item><item><title>RE: Passing in Params into ChildFormDialog control</title><link>http://forum.strataframe.net/FindPost21122.aspx</link><description>Hello Leonard,&lt;br&gt;
If you send the parameter .ShowDialog("Hello World")&lt;br&gt;
You can catch the parameter in the constructor of your ChildForm like this:&lt;br&gt;
&lt;br&gt;
[codesnippet]&lt;br&gt;
[code]&lt;br&gt;
Dim m_sParam As String&lt;br&gt;
&lt;br&gt;
Public Sub New (MyParam As String)&lt;br&gt;
       m_sParam = MyParam&lt;br&gt;
End Sub&lt;br&gt;
[/code]&lt;br&gt;
[/codesnippet]&lt;br&gt;
&lt;br&gt;
And do what ever logic you need.&lt;br&gt;
If you are using SF ListView automation this won´t work since there´s no way to send parameters to childform from it.&lt;br&gt;
&lt;br&gt;
Regards &lt;br&gt;
Guillermo&lt;br&gt;</description><pubDate>Wed, 10 Dec 2008 18:49:36 GMT</pubDate><dc:creator>Guillermo Vilas</dc:creator></item></channel></rss>