﻿<?xml version='1.0' encoding='UTF-8'?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>StrataFrame Forum / General .NET Discussion / .NET Forums  / How to call forms and more....? / Latest Posts</title><generator>InstantForum.NET v4.1.4</generator><description>StrataFrame Forum</description><link>http://forum.strataframe.net/</link><webMaster>forum@strataframe.net</webMaster><lastBuildDate>Fri, 21 Nov 2008 13:12:11 GMT</lastBuildDate><ttl>20</ttl><item><title>RE: How to call forms and more....?</title><link>http://forum.strataframe.net/Topic11445-14-1.aspx</link><description>No, we don't have any reusable methods for opening forms like that.  Here's a link to some more information:&lt;/P&gt;&lt;P&gt;&lt;A href="http://forum.strataframe.net/FindPost9345.aspx"&gt;http://forum.strataframe.net/FindPost9345.aspx&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Basically, you cycle through the MdiChildren on the main MDI form, and if one of those forms is the desired type, then you activate it; otherwise, you create a new form of the desired type and show it.</description><pubDate>Thu, 13 Sep 2007 09:40:11 GMT</pubDate><dc:creator>Ben Chase</dc:creator></item><item><title>How to call forms and more....?</title><link>http://forum.strataframe.net/Topic11445-14-1.aspx</link><description>Hi all,&lt;P&gt;I am new to .NET and SF, I have a concern about what is the proper or the SF way to call/open forms within the application.  I found the code below in the forums and I wonder if there is such a method in any of the SF classes to re-used, instead of having to create one manually?:&lt;/P&gt;&lt;P&gt;[codesnippet]&lt;FONT size=2&gt;&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#008000 size=2&gt;'-- Establish Locals&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Dim&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; System.Windows.Forms.Form&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#008000 size=2&gt;'-- Create the form &lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;loForm = &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;CType&lt;/FONT&gt;&lt;FONT size=2&gt;(Activator.CreateInstance(FormType), System.Windows.Forms.Form)&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#008000 size=2&gt;'-- Set the MDI &lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;loForm.MdiParent = &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Me&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#008000 size=2&gt;'-- Show the Form &lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;loForm.Show()&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;[/codesnippet]&lt;/P&gt;&lt;P&gt;Also, how to handle only one instance of the form to be opened, ex: I don't want the users to open the forms more than once.&lt;/P&gt;&lt;P&gt;P.S.&lt;/P&gt;&lt;P&gt;I am using an MDI form based on SF StandardForm class.</description><pubDate>Wed, 12 Sep 2007 13:48:19 GMT</pubDate><dc:creator>Edhy Rijo</dc:creator></item></channel></rss>