﻿<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>StrataFrame Forum » .NET Forums » General .NET Discussion  » How to call forms and more....?</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:44:57 GMT</lastBuildDate><ttl>20</ttl><item><title>How to call forms and more....?</title><link>http://forum.strataframe.net/FindPost11445.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.&amp;nbsp; 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>Thu, 13 Sep 2007 09:40:11 GMT</pubDate><dc:creator>Edhy Rijo</dc:creator></item><item><title>RE: How to call forms and more....?</title><link>http://forum.strataframe.net/FindPost11451.aspx</link><description>No, we don't have any reusable methods for opening forms like that.&amp;nbsp; 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,&amp;nbsp;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>StrataFrame Team</dc:creator></item></channel></rss>