﻿<?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?)  » Child Form Dialog</title><generator>InstantForum 2017-1 Final</generator><description>StrataFrame Forum</description><link>http://forum.strataframe.net/</link><webMaster>StrataFrame Forum</webMaster><lastBuildDate>Tue, 15 Sep 2026 23:33:16 GMT</lastBuildDate><ttl>20</ttl><item><title>Child Form Dialog</title><link>http://forum.strataframe.net/FindPost7600.aspx</link><description>I have an contacts user control that I use throughout my application to enter&amp;nbsp;contact information phone numbers etc. &lt;/P&gt;&lt;P&gt;It&amp;nbsp;works nice drop it and a BO on a form set a few properties and I'm done. Because some forms don't have as much real estate as others I added the ability to be able to hide&amp;nbsp;fields on the user control which&amp;nbsp;works out&amp;nbsp;nice, however now I wanted to&amp;nbsp;allow the user to pop up a maintenence form that has all the extra info that may not be shown in that instance of the usercontrol.&lt;/P&gt;&lt;P&gt;Problem is when I try to use the child form dialog control on the usercontrol it squacks about not being on a something inherited from SF base form, (the usercontrol is ultimatley inherited from &lt;FONT size=2&gt;MicroFour.StrataFrame.UI.Windows.Forms.UserControl with 1 layer of inheritance)&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;I ignore that messagebox&amp;nbsp;and configure the childcontrol anyway's but get object not set to an instance when I call the&amp;nbsp;showdialog method.</description><pubDate>Thu, 22 Mar 2007 13:23:12 GMT</pubDate><dc:creator>Paul Chase</dc:creator></item><item><title>RE: Child Form Dialog</title><link>http://forum.strataframe.net/FindPost7660.aspx</link><description>Thanks Ben the problem was I was setting the source BO to be the BO on the user control (which made sense to me) but it needed to be the BO on the main form so i just am grabbing it fromthe user controls translations.&lt;/P&gt;&lt;P&gt; Incorrect&lt;/P&gt;&lt;P&gt;ChildDialogTranslationItem.SourceBusinessObject = &lt;FONT color=#0000ff size=2&gt;"WhateverUserControl.BusinesObject"&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;Correct&lt;/P&gt;&lt;P&gt;ChildDialogTranslationItem.SourceBusinessObject = &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Me&lt;/FONT&gt;&lt;FONT size=2&gt;.BOTranslations(0).SourceBusinessObject&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size=2&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT size=2&gt;P&lt;/P&gt;&lt;/FONT&gt;</description><pubDate>Thu, 22 Mar 2007 13:23:12 GMT</pubDate><dc:creator>Paul Chase</dc:creator></item><item><title>RE: Child Form Dialog</title><link>http://forum.strataframe.net/FindPost7639.aspx</link><description>If it cannot find the BOs then you might need to set the ParentForm property on the ChildFormDialog.&amp;nbsp; Also, you can drop a ChildFormDialog on the form and configure it the way it needs to be configured and then open the Form.designer.vb file and copy the code that was generated for the ChildFormDialog&amp;nbsp;&amp;amp; paste it into your UserControl.</description><pubDate>Wed, 21 Mar 2007 08:23:37 GMT</pubDate><dc:creator>StrataFrame Team</dc:creator></item><item><title>RE: Child Form Dialog</title><link>http://forum.strataframe.net/FindPost7635.aspx</link><description>Thanks Ben,&lt;/P&gt;&lt;P&gt;Thats exactly what I needed. I am still having a problem with the translation item not finding the bus obj but I'll look at it in the morning, You guys have me spoiled with all the Drag and Drop stuff&amp;nbsp;I forget&amp;nbsp;that you can actually use them programtically.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Anyways&amp;nbsp;Thanks again &amp;nbsp;&amp;nbsp;</description><pubDate>Tue, 20 Mar 2007 22:21:13 GMT</pubDate><dc:creator>Paul Chase</dc:creator></item><item><title>RE: Child Form Dialog</title><link>http://forum.strataframe.net/FindPost7619.aspx</link><description>You could configure it programmatically... the UserControl implements the IParentFormLoading interface, which has the ParentFormLoading event.&amp;nbsp; Handle that event and put the necessary code in the handler to initialize the ChildFormDialog.&amp;nbsp; You'll probably want to define the ChildFormDialog itself as a private variable on the UserControl rather than dropping it on the form.</description><pubDate>Tue, 20 Mar 2007 17:14:01 GMT</pubDate><dc:creator>StrataFrame Team</dc:creator></item><item><title>RE: Child Form Dialog</title><link>http://forum.strataframe.net/FindPost7615.aspx</link><description>Trent,&lt;/P&gt;&lt;P&gt;I can make what I need to make work-work but it kinda sucks&amp;nbsp;as my goal was to have the childdialog&amp;nbsp;configured in the UserControl &lt;STRONG&gt;once&lt;/STRONG&gt; instead of having to configure the ChildDialog in every parent form the user control is in. &lt;/P&gt;&lt;P&gt;Is there any way you can think of around this? &lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Paul</description><pubDate>Tue, 20 Mar 2007 15:46:17 GMT</pubDate><dc:creator>Paul Chase</dc:creator></item><item><title>RE: Child Form Dialog</title><link>http://forum.strataframe.net/FindPost7606.aspx</link><description>Here is part of the stack&lt;/P&gt;&lt;FONT size=1&gt;&lt;P&gt;MicroFour.StrataFrame.UI.Windows.Forms.ChildFormDialog.GetBusinessObject(BaseForm ParentControl, String BusinessObjectName)&lt;/P&gt;&lt;P&gt;at MicroFour.StrataFrame.UI.Windows.Forms.ChildFormDialog.CreateForm(Object[] Arguments)&lt;/P&gt;&lt;P&gt;at MicroFour.StrataFrame.UI.Windows.Forms.ChildFormDialog.ShowDialog(Object[] Arguments)&lt;/P&gt;&lt;P&gt;at MicroFour.StrataFrame.UI.Windows.Forms.ChildFormDialog.ShowDialog()&lt;/P&gt;&lt;/FONT&gt;&lt;P&gt;Evidently it needs the base form so I think will&amp;nbsp;add a childformdialog&amp;nbsp;property to the user control and&amp;nbsp;have to add and configure a childformdialog control&amp;nbsp;on the main form rather than the user control. or raise an event in the usercontrol when the button is clicked that is handled in the main form. anyways that should work but if not you will be the first to know</description><pubDate>Tue, 20 Mar 2007 12:57:27 GMT</pubDate><dc:creator>Paul Chase</dc:creator></item><item><title>RE: Child Form Dialog</title><link>http://forum.strataframe.net/FindPost7605.aspx</link><description>Trent,&lt;/P&gt;&lt;P&gt;Maybe I confused you. I have a form say customer. I have a user control for contacts. I drop the user control on the customer form and configure it everything works fine. From the user control I want to launch a child form. I drop a Child Form Dialog control on the user control which inherits from &lt;FONT size=2&gt;MicroFour.StrataFrame.UI.Windows.Forms.UserControl and I the get the following error message&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size=2&gt;&lt;IMG src="http://forum.strataframe.net/Uploads/Images/036a4fc1-3acd-487b-8014-b73e.png"&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;So it is not possible to use the child form dialog control&amp;nbsp;from a user control? &lt;/P&gt;&lt;P&gt;&lt;FONT size=2&gt;&amp;nbsp;&lt;/P&gt;&lt;/FONT&gt;</description><pubDate>Tue, 20 Mar 2007 12:41:18 GMT</pubDate><dc:creator>Paul Chase</dc:creator></item><item><title>RE: Child Form Dialog</title><link>http://forum.strataframe.net/FindPost7602.aspx</link><description>Even child forms should be inherited from a form that has a root of the BaseForm.&amp;nbsp; This form has all of the logic which know how to properly interact with the BOs.&amp;nbsp; Just change your form&amp;nbsp;inheritance to MicroFour.StrataFrame.UI.Windows.Forms.StandardForm and your problem will go away.&amp;nbsp; You may, howveer, need to re-drop your control in order to establish the Synchorization (or ParentControl) property.</description><pubDate>Tue, 20 Mar 2007 10:48:46 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item></channel></rss>